75 lines
2.6 KiB
Makefile
75 lines
2.6 KiB
Makefile
moo_python_sources += \
|
|
moopython/pygtk/moo-pygtk.c \
|
|
moopython/pygtk/moo-pygtk.h
|
|
|
|
built_moo_python_sources += \
|
|
moopython/pygtk/moo-mod.h
|
|
|
|
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 \
|
|
moopython/pygtk/mooedit.override \
|
|
moopython/pygtk/moo.override
|
|
|
|
EXTRA_DIST += \
|
|
$(moo_defs_files) \
|
|
$(moo_override_files) \
|
|
moopython/pygtk/moo.py
|
|
|
|
built_moo_python_sources += \
|
|
moopython/pygtk/moo-mod.c \
|
|
moopython/pygtk/moo-mod.h
|
|
|
|
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 \
|
|
$(srcdir)/moopython/codegen/argtypes_m.py \
|
|
$(srcdir)/moopython/codegen/reversewrapper.py
|
|
codegen_script = $(srcdir)/moopython/codegen/codegen.py
|
|
codegen = $(PYTHON) $(codegen_script) $(codegen_platform) --pygtk-version=$(PYGTK_MINOR_VERSION)
|
|
|
|
moopython/pygtk/moo-mod.c: $(moo_override_files) $(moo_defs_files) $(codegen_files)
|
|
$(AM_V_at)$(MKDIR_P) moopython/pygtk
|
|
$(AM_V_GEN)$(codegen) --prefix _moo \
|
|
--load-types $(srcdir)/moopython/codegen/argtypes_m.py \
|
|
--register $(PYGOBJECT_DEFS_DIR)/gio-types.defs \
|
|
--register $(PYGTK_DEFS_DIR)/gtk-types.defs \
|
|
--register $(PYGTK_DEFS_DIR)/gdk-types.defs \
|
|
--override $(srcdir)/moopython/pygtk/moo.override \
|
|
--outfilename moopython/pygtk/moo-mod.c \
|
|
$(moo_main_defs_file) > $@.tmp && \
|
|
mv $@.tmp $@
|
|
|
|
moopython/pygtk/moo-mod.h: moopython/pygtk/moo.py $(top_srcdir)/tools/xml2h.py
|
|
$(AM_V_at)$(MKDIR_P) moopython/pygtk
|
|
$(AM_V_GEN)$(PYTHON) $(top_srcdir)/tools/xml2h.py $(srcdir)/moopython/pygtk/moo.py moopython/pygtk/moo-mod.h MOO_PY
|