Generate python defs file in python dir

This commit is contained in:
Yevgen Muntyan 2010-12-14 00:25:18 -08:00
parent 71aa8e9db2
commit 34ed7b06b7
4 changed files with 24 additions and 14 deletions

View File

@ -22,7 +22,6 @@ EXTRA_DIST = \
$(gendefs_files) \
$(genlua_files) \
sourcefiles.mak \
moo.defs \
moo.xml
BUILT_SOURCES =
@ -46,11 +45,4 @@ moo.xml.stamp: $(docparser_files) $(source_files)
rm -f moo.xml.tmp
echo stamp > moo.xml.stamp
BUILT_SOURCES += moo.defs.stamp
moo.defs.stamp: $(gendefs_files) moo.xml Makefile
$(PYTHON) $(srcdir)/gendefs.py $(srcdir)/moo.xml > moo.defs.tmp && \
(cmp -s moo.defs.tmp $(srcdir)/moo.defs || mv moo.defs.tmp $(srcdir)/moo.defs)
rm -f moo.defs.tmp
echo stamp > moo.defs.stamp
endif

View File

@ -5,13 +5,18 @@ moo_python_sources += \
built_moo_python_sources += \
moopython/pygtk/moo-mod.h
moo_main_defs_file = \
$(srcdir)/moopython/pygtk/moo-full.defs
moo_defs_files = \
$(top_srcdir)/api/moo.defs \
moo_main_defs_file = \
$(srcdir)/moopython/pygtk/moo.defs
moo_defs_files = \
$(srcdir)/moopython/pygtk/moo-generated.defs \
$(moo_main_defs_file)
gendefs_files = \
$(top_srcdir)/api/gendefs.py \
$(top_srcdir)/api/mpi/__init__.py \
$(top_srcdir)/api/mpi/module.py \
$(top_srcdir)/api/mpi/defswriter.py
moo_override_files = \
moopython/pygtk/mooutils.override \
moopython/pygtk/moopaned.override \
@ -31,6 +36,19 @@ if MOO_OS_WIN32
codegen_platform = --platform win32
endif
if MOO_DEV_MODE
built_moo_sources += moopython/pygtk/moo-generated.defs.stamp
moopython/pygtk/moo-generated.defs.stamp: $(gendefs_files) $(top_srcdir)/api/moo.xml Makefile
$(AM_V_at)$(MKDIR_P) moopython/pygtk
$(AM_V_GEN)$(PYTHON) $(top_srcdir)/api/gendefs.py $(top_srcdir)/api/moo.xml > moopython/pygtk/moo-generated.defs.tmp && \
(cmp -s moopython/pygtk/moo-generated.defs.tmp $(srcdir)/moopython/pygtk/moo-generated.defs || \
mv moopython/pygtk/moo-generated.defs.tmp $(srcdir)/moopython/pygtk/moo-generated.defs)
$(AM_V_at)rm -f moopython/pygtk/moo-generated.defs.tmp
$(AM_V_at)echo stamp > moopython/pygtk/moo-generated.defs.stamp
endif
codegen_files = \
$(srcdir)/moopython/codegen/codegen.py \
$(srcdir)/moopython/codegen/argtypes.py \

View File

@ -1,6 +1,6 @@
;; -*- scheme -*-
(include "../../../api/moo.defs")
(include "moo-generated.defs")
(define-function _window_class_add_action
(c-name "moo_window_class_add_action")