Makefile 2.4 KB

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