Separate variable for python used in the build, MOO_PYTHON
This commit is contained in:
parent
adec23444d
commit
50f8089f9c
@ -41,7 +41,7 @@ include sourcefiles.mak
|
||||
|
||||
BUILT_SOURCES += moo.xml.stamp
|
||||
moo.xml.stamp: $(docparser_files) $(source_files)
|
||||
$(AM_V_GEN)$(PYTHON) $(srcdir)/parsedocs.py \
|
||||
$(AM_V_GEN)$(MOO_PYTHON) $(srcdir)/parsedocs.py \
|
||||
--source-dir $(top_srcdir)/moo/mooapp \
|
||||
--source-dir $(top_srcdir)/moo/mooedit \
|
||||
--source-dir $(top_srcdir)/moo/moofileview \
|
||||
@ -60,7 +60,7 @@ moo.xml.stamp: $(docparser_files) $(source_files)
|
||||
BUILT_SOURCES += gtk.xml.stamp
|
||||
gtk.xml.stamp: $(docparser_files) $(top_srcdir)/moo/moolua/gtk-api.c $(top_srcdir)/moo/moolua/gtk-api.h
|
||||
$(AM_V_at)$(MKDIR_P) moolua
|
||||
$(AM_V_GEN)$(PYTHON) $(srcdir)/parsedocs.py \
|
||||
$(AM_V_GEN)$(MOO_PYTHON) $(srcdir)/parsedocs.py \
|
||||
--source-file $(top_srcdir)/moo/moolua/gtk-api.c \
|
||||
--source-file $(top_srcdir)/moo/moolua/gtk-api.h \
|
||||
--module Gtk \
|
||||
|
@ -61,7 +61,10 @@ AC_ARG_VAR([WINDRES], [windres])
|
||||
AC_CHECK_TOOL(WINDRES, windres, :)
|
||||
|
||||
AC_ARG_VAR([PYTHON], [Python executable, required to run build scripts])
|
||||
AC_CHECK_PROGS(PYTHON, python, [AC_MSG_ERROR([Python not found])])
|
||||
AC_CHECK_PROGS(MOO_PYTHON, [python2 python2.7 python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 python], [none])
|
||||
if test "x$MOO_PYTHON" = "x"; then
|
||||
AC_MSG_ERROR([Python not found, it is required for the build])
|
||||
fi
|
||||
|
||||
MOO_AC_FLAGS
|
||||
|
||||
|
@ -21,14 +21,14 @@ script_docbook_sources = \
|
||||
|
||||
$(srcdir)/built/script-python.docbook: $(gendocbook_files) script-python.tmpl.docbook $(top_srcdir)/api/moo.xml
|
||||
$(AM_V_at)$(MKDIR_P) $(srcdir)/built
|
||||
$(AM_V_GEN)$(PYTHON) $(top_srcdir)/api/gendocbook.py \
|
||||
$(AM_V_GEN)$(MOO_PYTHON) $(top_srcdir)/api/gendocbook.py \
|
||||
--python --template $(srcdir)/script-python.tmpl.docbook \
|
||||
$(top_srcdir)/api/moo.xml > script-python.docbook.tmp && \
|
||||
mv script-python.docbook.tmp $(srcdir)/built/script-python.docbook
|
||||
|
||||
$(srcdir)/built/script-lua.docbook: $(gendocbook_files) script-lua.tmpl.docbook $(top_srcdir)/api/moo.xml $(top_srcdir)/api/gtk.xml
|
||||
$(AM_V_at)$(MKDIR_P) $(srcdir)/built
|
||||
$(AM_V_GEN)$(PYTHON) $(top_srcdir)/api/gendocbook.py \
|
||||
$(AM_V_GEN)$(MOO_PYTHON) $(top_srcdir)/api/gendocbook.py \
|
||||
--lua --template $(srcdir)/script-lua.tmpl.docbook \
|
||||
--import $(top_srcdir)/api/gtk.xml \
|
||||
$(top_srcdir)/api/moo.xml > script-lua.docbook.tmp && \
|
||||
@ -36,7 +36,7 @@ $(srcdir)/built/script-lua.docbook: $(gendocbook_files) script-lua.tmpl.docbook
|
||||
|
||||
$(srcdir)/built/script-lua-gtk.docbook: $(gendocbook_files) script-lua-gtk.tmpl.docbook $(top_srcdir)/api/gtk.xml
|
||||
$(AM_V_at)$(MKDIR_P) $(srcdir)/built
|
||||
$(AM_V_GEN)$(PYTHON) $(top_srcdir)/api/gendocbook.py \
|
||||
$(AM_V_GEN)$(MOO_PYTHON) $(top_srcdir)/api/gendocbook.py \
|
||||
--lua --template $(srcdir)/script-lua-gtk.tmpl.docbook \
|
||||
$(top_srcdir)/api/gtk.xml > script-lua-gtk.docbook.tmp && \
|
||||
mv script-lua-gtk.docbook.tmp $(srcdir)/built/script-lua-gtk.docbook
|
||||
@ -98,7 +98,7 @@ toc.xml: $(docbook_sources)
|
||||
|
||||
moo-help-sections.h.stamp: $(docbook_files) toc.xml genhelpsectionsh.py
|
||||
$(AM_V_at)$(MKDIR_P) $(srcdir)/built
|
||||
$(AM_V_GEN)$(PYTHON) $(srcdir)/genhelpsectionsh.py --toc=toc.xml --srcdir=$(srcdir) $(docbook_files) > moo-help-sections.h.tmp
|
||||
$(AM_V_GEN)$(MOO_PYTHON) $(srcdir)/genhelpsectionsh.py --toc=toc.xml --srcdir=$(srcdir) $(docbook_files) > moo-help-sections.h.tmp
|
||||
$(AM_V_at)cmp -s moo-help-sections.h.tmp $(srcdir)/built/moo-help-sections.h || \
|
||||
mv moo-help-sections.h.tmp $(srcdir)/built/moo-help-sections.h
|
||||
$(AM_V_at)rm -f moo-help-sections.h.tmp
|
||||
|
@ -47,39 +47,39 @@ test:
|
||||
|
||||
# glade/%-gxml.h: glade/%.glade $(top_srcdir)/tools/glade2c.py
|
||||
# $(MKDIR_P) glade
|
||||
# $(PYTHON) $(top_srcdir)/tools/glade2c.py $< > $@.tmp && mv $@.tmp $@
|
||||
# $(MOO_PYTHON) $(top_srcdir)/tools/glade2c.py $< > $@.tmp && mv $@.tmp $@
|
||||
|
||||
mooutils/%-gxml.h: mooutils/glade/%.glade $(top_srcdir)/tools/glade2c.py
|
||||
$(AM_V_at) $(MKDIR_P) `dirname $@`
|
||||
$(AM_V_GEN)$(PYTHON) $(top_srcdir)/tools/glade2c.py $< > $@.tmp && mv $@.tmp $@
|
||||
$(AM_V_GEN)$(MOO_PYTHON) $(top_srcdir)/tools/glade2c.py $< > $@.tmp && mv $@.tmp $@
|
||||
|
||||
moofileview/%-gxml.h: moofileview/glade/%.glade $(top_srcdir)/tools/glade2c.py
|
||||
$(AM_V_at) $(MKDIR_P) `dirname $@`
|
||||
$(AM_V_GEN)$(PYTHON) $(top_srcdir)/tools/glade2c.py $< > $@.tmp && mv $@.tmp $@
|
||||
$(AM_V_GEN)$(MOO_PYTHON) $(top_srcdir)/tools/glade2c.py $< > $@.tmp && mv $@.tmp $@
|
||||
|
||||
mooedit/%-gxml.h: mooedit/glade/%.glade $(top_srcdir)/tools/glade2c.py
|
||||
$(AM_V_at) $(MKDIR_P) `dirname $@`
|
||||
$(AM_V_GEN)$(PYTHON) $(top_srcdir)/tools/glade2c.py $< > $@.tmp && mv $@.tmp $@
|
||||
$(AM_V_GEN)$(MOO_PYTHON) $(top_srcdir)/tools/glade2c.py $< > $@.tmp && mv $@.tmp $@
|
||||
|
||||
mooapp/%-gxml.h: mooapp/glade/%.glade $(top_srcdir)/tools/glade2c.py
|
||||
$(AM_V_at) $(MKDIR_P) `dirname $@`
|
||||
$(AM_V_GEN)$(PYTHON) $(top_srcdir)/tools/glade2c.py $< > $@.tmp && mv $@.tmp $@
|
||||
$(AM_V_GEN)$(MOO_PYTHON) $(top_srcdir)/tools/glade2c.py $< > $@.tmp && mv $@.tmp $@
|
||||
|
||||
plugins/%-gxml.h: plugins/glade/%.glade $(top_srcdir)/tools/glade2c.py
|
||||
$(AM_V_at) $(MKDIR_P) `dirname $@`
|
||||
$(AM_V_GEN)$(PYTHON) $(top_srcdir)/tools/glade2c.py $< > $@.tmp && mv $@.tmp $@
|
||||
$(AM_V_GEN)$(MOO_PYTHON) $(top_srcdir)/tools/glade2c.py $< > $@.tmp && mv $@.tmp $@
|
||||
|
||||
plugins/usertools/%-gxml.h: plugins/usertools/glade/%.glade $(top_srcdir)/tools/glade2c.py
|
||||
$(AM_V_at) $(MKDIR_P) `dirname $@`
|
||||
$(AM_V_GEN)$(PYTHON) $(top_srcdir)/tools/glade2c.py $< > $@.tmp && mv $@.tmp $@
|
||||
$(AM_V_GEN)$(MOO_PYTHON) $(top_srcdir)/tools/glade2c.py $< > $@.tmp && mv $@.tmp $@
|
||||
|
||||
# %-ui.h: %.xml $(top_srcdir)/tools/xml2h.py
|
||||
# $(AM_V_GEN)$(PYTHON) $(top_srcdir)/tools/xml2h.py $< $@.tmp $*_ui_xml && mv $@.tmp $@
|
||||
# $(AM_V_GEN)$(MOO_PYTHON) $(top_srcdir)/tools/xml2h.py $< $@.tmp $*_ui_xml && mv $@.tmp $@
|
||||
|
||||
moofileview/%-ui.h: moofileview/%.xml $(top_srcdir)/tools/xml2h.py
|
||||
$(AM_V_at) $(MKDIR_P) `dirname $@`
|
||||
$(AM_V_GEN)$(PYTHON) $(top_srcdir)/tools/xml2h.py $< $@.tmp $*_ui_xml && mv $@.tmp $@
|
||||
$(AM_V_GEN)$(MOO_PYTHON) $(top_srcdir)/tools/xml2h.py $< $@.tmp $*_ui_xml && mv $@.tmp $@
|
||||
|
||||
mooedit/%-ui.h: mooedit/%.xml $(top_srcdir)/tools/xml2h.py
|
||||
$(AM_V_at) $(MKDIR_P) `dirname $@`
|
||||
$(AM_V_GEN)$(PYTHON) $(top_srcdir)/tools/xml2h.py $< $@.tmp $*_ui_xml && mv $@.tmp $@
|
||||
$(AM_V_GEN)$(MOO_PYTHON) $(top_srcdir)/tools/xml2h.py $< $@.tmp $*_ui_xml && mv $@.tmp $@
|
||||
|
@ -17,7 +17,7 @@ if MOO_BUILD_APP
|
||||
bin_PROGRAMS += medit
|
||||
|
||||
TESTS = medit-app/run-tests-uninstalled.sh
|
||||
TESTS_ENVIRONMENT = EXEEXT=$(EXEEXT) top_srcdir=$(top_srcdir) bindir=$(bindir) PYTHON=$(PYTHON) print_functions=$(srcdir)/medit-app/print-functions.py
|
||||
TESTS_ENVIRONMENT = EXEEXT=$(EXEEXT) top_srcdir=$(top_srcdir) bindir=$(bindir) PYTHON=$(MOO_PYTHON) print_functions=$(srcdir)/medit-app/print-functions.py
|
||||
|
||||
if !MOO_ENABLE_COVERAGE
|
||||
TESTS_ENVIRONMENT += IGNORE_COVERAGE=1
|
||||
|
@ -23,4 +23,4 @@ built_moo_sources += \
|
||||
|
||||
built_moo_sources += mooapp-credits.h
|
||||
mooapp-credits.h: $(top_srcdir)/THANKS $(top_srcdir)/tools/xml2h.py
|
||||
$(AM_V_GEN)$(PYTHON) $(top_srcdir)/tools/xml2h.py $(top_srcdir)/THANKS mooapp-credits.h MOO_APP_CREDITS
|
||||
$(AM_V_GEN)$(MOO_PYTHON) $(top_srcdir)/tools/xml2h.py $(top_srcdir)/THANKS mooapp-credits.h MOO_APP_CREDITS
|
||||
|
@ -27,21 +27,21 @@ EXTRA_DIST += moolua/lua-default-init.lua
|
||||
built_moo_sources += moolua/lua-default-init.h
|
||||
moolua/lua-default-init.h: moolua/lua-default-init.lua $(top_srcdir)/tools/xml2h.py
|
||||
$(AM_V_at)$(MKDIR_P) moolua
|
||||
$(AM_V_GEN)$(PYTHON) $(top_srcdir)/tools/xml2h.py $(srcdir)/moolua/lua-default-init.lua moolua/lua-default-init.h.tmp LUA_DEFAULT_INIT \
|
||||
$(AM_V_GEN)$(MOO_PYTHON) $(top_srcdir)/tools/xml2h.py $(srcdir)/moolua/lua-default-init.lua moolua/lua-default-init.h.tmp LUA_DEFAULT_INIT \
|
||||
&& mv moolua/lua-default-init.h.tmp moolua/lua-default-init.h
|
||||
|
||||
EXTRA_DIST += moolua/lua-module-init.lua
|
||||
built_moo_sources += moolua/lua-module-init.h
|
||||
moolua/lua-module-init.h: moolua/lua-module-init.lua $(top_srcdir)/tools/xml2h.py
|
||||
$(AM_V_at)$(MKDIR_P) moolua
|
||||
$(AM_V_GEN)$(PYTHON) $(top_srcdir)/tools/xml2h.py $(srcdir)/moolua/lua-module-init.lua moolua/lua-module-init.h.tmp LUA_MODULE_INIT \
|
||||
$(AM_V_GEN)$(MOO_PYTHON) $(top_srcdir)/tools/xml2h.py $(srcdir)/moolua/lua-module-init.lua moolua/lua-module-init.h.tmp LUA_MODULE_INIT \
|
||||
&& mv moolua/lua-module-init.h.tmp moolua/lua-module-init.h
|
||||
|
||||
EXTRA_DIST += moolua/lua-plugin-init.lua
|
||||
built_moo_sources += moolua/lua-plugin-init.h
|
||||
moolua/lua-plugin-init.h: moolua/lua-plugin-init.lua $(top_srcdir)/tools/xml2h.py
|
||||
$(AM_V_at)$(MKDIR_P) moolua
|
||||
$(AM_V_GEN)$(PYTHON) $(top_srcdir)/tools/xml2h.py $(srcdir)/moolua/lua-plugin-init.lua moolua/lua-plugin-init.h.tmp LUA_PLUGIN_INIT \
|
||||
$(AM_V_GEN)$(MOO_PYTHON) $(top_srcdir)/tools/xml2h.py $(srcdir)/moolua/lua-plugin-init.lua moolua/lua-plugin-init.h.tmp LUA_PLUGIN_INIT \
|
||||
&& mv moolua/lua-plugin-init.h.tmp moolua/lua-plugin-init.h
|
||||
|
||||
if MOO_DEV_MODE
|
||||
@ -49,7 +49,7 @@ if MOO_DEV_MODE
|
||||
BUILT_SOURCES += moolua/moo-lua-api.cpp
|
||||
moolua/moo-lua-api.cpp: $(genlua_files) $(top_srcdir)/api/moo.xml $(top_srcdir)/api/gtk.xml
|
||||
$(AM_V_at)$(MKDIR_P) moolua
|
||||
$(AM_V_GEN)$(PYTHON) $(top_srcdir)/api/genlua.py \
|
||||
$(AM_V_GEN)$(MOO_PYTHON) $(top_srcdir)/api/genlua.py \
|
||||
--include-header moo-lua-api.h \
|
||||
--import $(top_srcdir)/api/gtk.xml \
|
||||
$(top_srcdir)/api/moo.xml > moolua/moo-lua-api.cpp.tmp && \
|
||||
@ -59,7 +59,7 @@ moolua/moo-lua-api.cpp: $(genlua_files) $(top_srcdir)/api/moo.xml $(top_srcdir)/
|
||||
BUILT_SOURCES += moolua/gtk-lua-api.cpp
|
||||
moolua/gtk-lua-api.cpp: $(genlua_files) $(top_srcdir)/api/gtk.xml
|
||||
$(AM_V_at)$(MKDIR_P) moolua
|
||||
$(AM_V_GEN)$(PYTHON) $(top_srcdir)/api/genlua.py \
|
||||
$(AM_V_GEN)$(MOO_PYTHON) $(top_srcdir)/api/genlua.py \
|
||||
--include-header gtk-lua-api.h \
|
||||
$(top_srcdir)/api/gtk.xml > moolua/gtk-lua-api.cpp.tmp && \
|
||||
mv moolua/gtk-lua-api.cpp.tmp $(srcdir)/moolua/gtk-lua-api.cpp
|
||||
|
@ -24,7 +24,7 @@ EXTRA_DIST += moopython/medit-python-init.py
|
||||
built_moo_sources += moopython/medit-python-init.h
|
||||
moopython/medit-python-init.h: moopython/medit-python-init.py $(top_srcdir)/tools/xml2h.py
|
||||
$(AM_V_at)$(MKDIR_P) moopython
|
||||
$(AM_V_GEN)$(PYTHON) $(top_srcdir)/tools/xml2h.py $(srcdir)/moopython/medit-python-init.py \
|
||||
$(AM_V_GEN)$(MOO_PYTHON) $(top_srcdir)/tools/xml2h.py $(srcdir)/moopython/medit-python-init.py \
|
||||
moopython/medit-python-init.h.tmp MEDIT_PYTHON_INIT_PY \
|
||||
&& mv moopython/medit-python-init.h.tmp moopython/medit-python-init.h
|
||||
|
||||
|
@ -34,7 +34,7 @@ endif
|
||||
built_moo_python_sources += moopython/pygtk/moo.defs
|
||||
moopython/pygtk/moo.defs: $(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.defs.tmp
|
||||
$(AM_V_GEN)$(MOO_PYTHON) $(top_srcdir)/api/gendefs.py $(top_srcdir)/api/moo.xml > moopython/pygtk/moo.defs.tmp
|
||||
$(AM_V_at)mv moopython/pygtk/moo.defs.tmp moopython/pygtk/moo.defs
|
||||
|
||||
codegen_files = \
|
||||
@ -43,7 +43,7 @@ codegen_files = \
|
||||
$(srcdir)/moopython/codegen/argtypes_m.py \
|
||||
$(srcdir)/moopython/codegen/reversewrapper.py
|
||||
codegen_script = $(srcdir)/moopython/codegen/codegen.py
|
||||
codegen = $(PYTHON) $(codegen_script) $(codegen_platform) \
|
||||
codegen = $(MOO_PYTHON) $(codegen_script) $(codegen_platform) \
|
||||
--codebefore $(srcdir)/moopython/pygtk/codebefore.c \
|
||||
--codeafter $(srcdir)/moopython/pygtk/codeafter.c
|
||||
|
||||
@ -63,4 +63,4 @@ moopython/pygtk/moo-mod.c: $(moo_override_files) moopython/pygtk/moo.defs $(code
|
||||
|
||||
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
|
||||
$(AM_V_GEN)$(MOO_PYTHON) $(top_srcdir)/tools/xml2h.py $(srcdir)/moopython/pygtk/moo.py moopython/pygtk/moo-mod.h MOO_PY
|
||||
|
@ -31,7 +31,7 @@ EXTRA_DIST += plugins/usertools/lua-tool-setup.lua
|
||||
built_plugins_sources += plugins/usertools/lua-tool-setup.h
|
||||
plugins/usertools/lua-tool-setup.h: plugins/usertools/lua-tool-setup.lua $(top_srcdir)/tools/xml2h.py
|
||||
$(AM_V_at)$(MKDIR_P) plugins/usertools
|
||||
$(AM_V_GEN)$(PYTHON) $(top_srcdir)/tools/xml2h.py $(srcdir)/plugins/usertools/lua-tool-setup.lua \
|
||||
$(AM_V_GEN)$(MOO_PYTHON) $(top_srcdir)/tools/xml2h.py $(srcdir)/plugins/usertools/lua-tool-setup.lua \
|
||||
plugins/usertools/lua-tool-setup.h.tmp LUA_TOOL_SETUP_LUA \
|
||||
&& mv plugins/usertools/lua-tool-setup.h.tmp plugins/usertools/lua-tool-setup.h
|
||||
|
||||
@ -41,7 +41,7 @@ if MOO_ENABLE_PYTHON
|
||||
built_plugins_sources += plugins/usertools/python-tool-setup.h
|
||||
plugins/usertools/python-tool-setup.h: plugins/usertools/python-tool-setup.py $(top_srcdir)/tools/xml2h.py
|
||||
$(AM_V_at)$(MKDIR_P) plugins/usertools
|
||||
$(AM_V_GEN)$(PYTHON) $(top_srcdir)/tools/xml2h.py $(srcdir)/plugins/usertools/python-tool-setup.py \
|
||||
$(AM_V_GEN)$(MOO_PYTHON) $(top_srcdir)/tools/xml2h.py $(srcdir)/plugins/usertools/python-tool-setup.py \
|
||||
plugins/usertools/python-tool-setup.h.tmp PYTHON_TOOL_SETUP_PY \
|
||||
&& mv plugins/usertools/python-tool-setup.h.tmp plugins/usertools/python-tool-setup.h
|
||||
endif
|
||||
@ -72,5 +72,5 @@ endif
|
||||
built_plugins_sources += plugins/usertools/menu.xml plugins/usertools/context.xml
|
||||
plugins/usertools/%.xml: plugins/usertools/%-tmpl.xml plugins/usertools/genplatxml.py
|
||||
$(AM_V_at)$(MKDIR_P) plugins/usertools
|
||||
$(AM_V_GEN)$(PYTHON) $(srcdir)/plugins/usertools/genplatxml.py $(genplatxml_args) \
|
||||
$(AM_V_GEN)$(MOO_PYTHON) $(srcdir)/plugins/usertools/genplatxml.py $(genplatxml_args) \
|
||||
$(srcdir)/plugins/usertools/$*-tmpl.xml > $@.tmp && mv $@.tmp $@
|
||||
|
Loading…
x
Reference in New Issue
Block a user