| 1 | MODULE_TOPDIR = ../..
|
|---|
| 2 |
|
|---|
| 3 | SUBDIRS = docs animation datacatalog mapswipe gmodeler rlisetup psmap dbmgr vdigit iclass gcp timeline tplot photo2image image2target
|
|---|
| 4 | EXTRA_CLEAN_FILES = menustrings.py build_ext.pyc xml/menudata.xml xml/module_tree_menudata.xml */*.pyc
|
|---|
| 5 |
|
|---|
| 6 | include $(MODULE_TOPDIR)/include/Make/Dir.make
|
|---|
| 7 | include $(MODULE_TOPDIR)/include/Make/Python.make
|
|---|
| 8 |
|
|---|
| 9 | DSTDIR = $(GUIDIR)/wxpython
|
|---|
| 10 |
|
|---|
| 11 | SRCFILES := $(wildcard icons/*.py scripts/*.py xml/*) \
|
|---|
| 12 | $(wildcard animation/*.py core/*.py datacatalog/*.py dbmgr/*.py gcp/*.py gmodeler/*.py \
|
|---|
| 13 | gui_core/*.py iclass/*.py lmgr/*.py location_wizard/*.py mapwin/*.py mapdisp/*.py \
|
|---|
| 14 | mapswipe/*.py modules/*.py nviz/*.py psmap/*.py rdigit/*.py \
|
|---|
| 15 | rlisetup/*.py startup/*.py timeline/*.py vdigit/*.py \
|
|---|
| 16 | vnet/*.py web_services/*.py wxplot/*.py iscatt/*.py tplot/*.py photo2image/*.py image2target/*.py) \
|
|---|
| 17 | gis_set.py gis_set_error.py wxgui.py README
|
|---|
| 18 |
|
|---|
| 19 | DSTFILES := $(patsubst %,$(DSTDIR)/%,$(SRCFILES)) \
|
|---|
| 20 | $(patsubst %.py,$(DSTDIR)/%.pyc,$(filter %.py,$(SRCFILES)))
|
|---|
| 21 |
|
|---|
| 22 | PYDSTDIRS := $(patsubst %,$(DSTDIR)/%,animation core datacatalog dbmgr gcp gmodeler \
|
|---|
| 23 | gui_core iclass lmgr location_wizard mapwin mapdisp modules nviz psmap \
|
|---|
| 24 | mapswipe vdigit wxplot web_services rdigit rlisetup startup \
|
|---|
| 25 | vnet timeline iscatt tplot photo2image image2target)
|
|---|
| 26 |
|
|---|
| 27 |
|
|---|
| 28 | DSTDIRS := $(patsubst %,$(DSTDIR)/%,icons scripts xml)
|
|---|
| 29 |
|
|---|
| 30 | default: $(DSTFILES)
|
|---|
| 31 | -$(MAKE) $(DSTDIR)/xml/module_items.xml
|
|---|
| 32 | -$(MAKE) xml/menudata.xml
|
|---|
| 33 | -$(MAKE) xml/module_tree_menudata.xml
|
|---|
| 34 | -$(MAKE) menustrings.py
|
|---|
| 35 | $(MAKE) parsubdirs
|
|---|
| 36 |
|
|---|
| 37 |
|
|---|
| 38 | $(DSTDIR)/%: % | $(PYDSTDIRS) $(DSTDIRS)
|
|---|
| 39 | $(INSTALL_DATA) $< $@
|
|---|
| 40 |
|
|---|
| 41 | xml/menudata.xml: core/toolboxes.py
|
|---|
| 42 | $(call run_grass,$(PYTHON) $< > $@)
|
|---|
| 43 | $(call run_grass,$(PYTHON) $< "validate" $@)
|
|---|
| 44 |
|
|---|
| 45 | xml/module_tree_menudata.xml: core/toolboxes.py
|
|---|
| 46 | $(call run_grass,$(PYTHON) $< "module_tree" > $@)
|
|---|
| 47 | $(call run_grass,$(PYTHON) $< "validate" $@)
|
|---|
| 48 |
|
|---|
| 49 | menustrings.py: core/menutree.py $(DSTDIR)/xml/menudata.xml $(DSTDIR)/xml/module_tree_menudata.xml $(DSTDIR)/xml/menudata_modeler.xml $(DSTDIR)/xml/menudata_psmap.xml
|
|---|
| 50 | @echo "# This is a generated file.\n" > $@
|
|---|
| 51 | $(call run_grass,$(PYTHON) $< "manager" >> $@)
|
|---|
| 52 | $(call run_grass,$(PYTHON) $< "module_tree" >> $@)
|
|---|
| 53 | $(call run_grass,$(PYTHON) $< "modeler" >> $@)
|
|---|
| 54 | $(call run_grass,$(PYTHON) $< "psmap" >> $@)
|
|---|
| 55 |
|
|---|
| 56 | $(DSTDIR)/xml/module_items.xml: tools/build_modules_xml.py
|
|---|
| 57 | @echo "Generating interface description for all modules..."
|
|---|
| 58 | $(call run_grass,$(PYTHON) $< > $@)
|
|---|
| 59 |
|
|---|
| 60 | $(PYDSTDIRS): %: | $(DSTDIR)
|
|---|
| 61 | $(MKDIR) $@
|
|---|
| 62 |
|
|---|
| 63 | $(DSTDIRS): %: | $(DSTDIR)
|
|---|
| 64 | $(MKDIR) $@
|
|---|
| 65 |
|
|---|
| 66 | $(DSTDIR):
|
|---|
| 67 | $(MKDIR) $@
|
|---|