Makefile 2.5 KB

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