medit/moo/moopython/Makefile.incl

171 lines
6.6 KiB
Makefile

#
# moo/moopython/Makefile.incl
#
moopython = $(moo_prefix)/moopython
moopython_srcdir = $(srcdir)/$(moopython)
moopython_plugins = \
$(moopython)/plugins/console.py \
$(moopython)/plugins/pyconsole.py \
$(moopython)/plugins/pystuff.py
moopython_sources = \
$(moopython)/moo-pygtk.c \
$(moopython)/moo-pygtk.h \
$(moopython)/mooapp-mod.h \
$(moopython)/mooedit-mod.h \
$(moopython)/mooterm-mod.h \
$(moopython)/mooutils-mod.h \
$(moopython)/moo-mod.h
moopython_built_sources = \
$(moopython)/mooapp-mod.h \
$(moopython)/mooedit-mod.h \
$(moopython)/mooterm-mod.h \
$(moopython)/mooutils-mod.h \
$(moopython)/moo-mod.h
nodist_moopython_sources =
moopython_cleanfiles =
mooedit_defs_files = \
$(moopython_srcdir)/mooeditor.defs \
$(moopython_srcdir)/mooplugin.defs
# mooutils_override_files = \
# $(moopython_srcdir)/moowindow.override
moopython_extra_dist = \
$(moopython_plugins) \
$(moopython)/moo-mod.py \
$(moopython)/moo-pygtk.c \
$(moopython)/mooapp-mod.py \
$(moopython)/mooapp-pygtk.defs \
$(moopython)/mooapp-pygtk.override \
$(moopython)/mooapp-mod.c \
$(mooedit_defs_files) \
$(moopython)/mooedit-mod.py \
$(moopython)/mooedit-pygtk.defs \
$(moopython)/mooedit-pygtk.override \
$(moopython)/mooedit-mod.c \
$(moopython)/mooterm-mod.py \
$(moopython)/mooterm-pygtk.defs \
$(moopython)/mooterm-pygtk.override \
$(moopython)/mooterm-mod.c \
$(moopython)/mooutils-mod.py \
$(moopython)/mooutils-pygtk.defs \
$(moopython)/mooutils-pygtk.override \
$(moopython)/mooutils-mod.c \
$(mooutils_defs_files) \
$(mooutils_override_files)
if MOO_BUILD_UTILS
moopython_sources += $(moopython)/mooutils-mod.c
nodist_moopython_sources += $(moopython)/mooutils-pygtk.c
moopython_built_sources += $(moopython)/mooutils-pygtk.c
moopython_cleanfiles += $(moopython)/mooutils-pygtk.c
endif MOO_BUILD_UTILS
if MOO_BUILD_TERM
moopython_sources += $(moopython)/mooterm-mod.c
nodist_moopython_sources += $(moopython)/mooterm-pygtk.c
moopython_built_sources += $(moopython)/mooterm-pygtk.c
moopython_cleanfiles += $(moopython)/mooterm-pygtk.c
endif MOO_BUILD_TERM
if MOO_BUILD_EDIT
moopython_sources += $(moopython)/mooedit-mod.c
nodist_moopython_sources += $(moopython)/mooedit-pygtk.c
moopython_built_sources += $(moopython)/mooedit-pygtk.c
moopython_cleanfiles += $(moopython)/mooedit-pygtk.c
endif MOO_BUILD_EDIT
if MOO_BUILD_APP
moopython_sources += $(moopython)/mooapp-mod.c
nodist_moopython_sources += $(moopython)/mooapp-pygtk.c
moopython_built_sources += $(moopython)/mooapp-pygtk.c
moopython_cleanfiles += $(moopython)/mooapp-pygtk.c
endif MOO_BUILD_APP
$(moopython)/mooutils-pygtk.c: $(moopython)/mooutils-pygtk.defs $(moopython)/mooutils-pygtk.override $(mooutils_override_files)
mkdir -p $(moopython)
pygtk-codegen-2.0 --prefix _moo_utils \
--register $(PYGTK_DEFS_DIR)/gtk-types.defs \
--register $(PYGTK_DEFS_DIR)/gdk-types.defs \
--override $(moopython_srcdir)/mooutils-pygtk.override \
--outfilename $(moopython)/mooutils-pygtk.c \
$(moopython_srcdir)/mooutils-pygtk.defs > $(moopython)/mooutils-pygtk.c
$(moopython)/mooterm-pygtk.c: $(moopython)/mooterm-pygtk.defs $(moopython)/mooterm-pygtk.override
mkdir -p $(moopython)
pygtk-codegen-2.0 --prefix _moo_term \
--register $(PYGTK_DEFS_DIR)/gtk-types.defs \
--register $(PYGTK_DEFS_DIR)/gdk-types.defs \
--register $(moopython_srcdir)/mooutils-pygtk.defs \
--override $(moopython_srcdir)/mooterm-pygtk.override \
--outfilename $(moopython)/mooterm-pygtk.c \
$(moopython_srcdir)/mooterm-pygtk.defs > $(moopython)/mooterm-pygtk.c
$(moopython)/mooedit-pygtk.c: $(moopython)/mooedit-pygtk.defs $(moopython)/mooedit-pygtk.override $(mooedit_defs_files)
mkdir -p $(moopython)
pygtk-codegen-2.0 --prefix _moo_edit \
--register $(PYGTK_DEFS_DIR)/gtk-types.defs \
--register $(PYGTK_DEFS_DIR)/gdk-types.defs \
--register $(moopython_srcdir)/mooutils-pygtk.defs \
--override $(moopython_srcdir)/mooedit-pygtk.override \
--outfilename $(moopython)/mooedit-pygtk.c \
$(moopython_srcdir)/mooedit-pygtk.defs > $(moopython)/mooedit-pygtk.c
$(moopython)/mooapp-pygtk.c: $(moopython)/mooapp-pygtk.defs $(moopython)/mooapp-pygtk.override
mkdir -p $(moopython)
pygtk-codegen-2.0 --prefix _moo_app \
--register $(PYGTK_DEFS_DIR)/gtk-types.defs \
--register $(PYGTK_DEFS_DIR)/gdk-types.defs \
--register $(moopython_srcdir)/mooedit-pygtk.defs \
--register $(moopython_srcdir)/mooterm-pygtk.defs \
--register $(moopython_srcdir)/mooutils-pygtk.defs \
--override $(moopython_srcdir)/mooapp-pygtk.override \
--outfilename $(moopython)/mooapp-pygtk.c \
$(moopython_srcdir)/mooapp-pygtk.defs > $(moopython)/mooapp-pygtk.c
$(moopython)/moo-mod.h: $(moopython)/moo-mod.py $(PY2H)
mkdir -p $(moopython)
sh $(PY2H) MOO_PY $(moopython_srcdir)/moo-mod.py > $(moopython)/moo-mod.h
$(moopython)/mooedit-mod.h: $(moopython)/mooedit-mod.py $(PY2H)
mkdir -p $(moopython)
sh $(PY2H) MOO_EDIT_PY $(moopython_srcdir)/mooedit-mod.py > $(moopython)/mooedit-mod.h
$(moopython)/mooapp-mod.h: $(moopython)/mooapp-mod.py $(PY2H)
mkdir -p $(moopython)
sh $(PY2H) MOO_APP_PY $(moopython_srcdir)/mooapp-mod.py > $(moopython)/mooapp-mod.h
$(moopython)/mooutils-mod.h: $(moopython)/mooutils-mod.py $(PY2H)
mkdir -p $(moopython)
sh $(PY2H) MOO_UTILS_PY $(moopython_srcdir)/mooutils-mod.py > $(moopython)/mooutils-mod.h
$(moopython)/mooterm-mod.h: $(moopython)/mooterm-mod.py $(PY2H)
mkdir -p $(moopython)
sh $(PY2H) MOO_TERM_PY $(moopython_srcdir)/mooterm-mod.py > $(moopython)/mooterm-mod.h
if MOO_USE_PYGTK
moo_sources += $(moopython_sources)
moo_built_sources += $(moopython_built_sources)
moo_nodist_sources += $(nodist_moopython_sources)
moo_cleanfiles += $(moopython_cleanfiles)
endif
moo_extra_dist += $(moopython_extra_dist)
###########################################################################
# Python plugin
mooplugin_python_sources = \
$(moopython)/mooplugin-python.c \
$(moopython)/mooplugin-python.h
if MOO_USE_PYGTK
moo_sources += $(mooplugin_python_sources)
endif
moo_extra_dist += $(mooplugin_python_sources)