Makefile 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. MODULE_TOPDIR = ../..
  2. SUBDIRS = docs animation datacatalog mapswipe gmodeler rlisetup psmap dbmgr vdigit 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 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. gis_set.py gis_set_error.py 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 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. -$(MAKE) $(DSTDIR)/xml/module_items.xml
  23. -$(MAKE) xml/menudata.xml
  24. -$(MAKE) xml/module_tree_menudata.xml
  25. -$(MAKE) menustrings.py
  26. $(MAKE) parsubdirs
  27. $(DSTDIR)/%: % | $(PYDSTDIRS) $(DSTDIRS)
  28. $(INSTALL_DATA) $< $@
  29. xml/menudata.xml: core/toolboxes.py
  30. $(call run_grass,$(PYTHON) $< > $@)
  31. $(call run_grass,$(PYTHON) $< "validate" $@)
  32. xml/module_tree_menudata.xml: core/toolboxes.py
  33. $(call run_grass,$(PYTHON) $< "module_tree" > $@)
  34. $(call run_grass,$(PYTHON) $< "validate" $@)
  35. 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
  36. @echo "# This is a generated file.\n" > $@
  37. $(call run_grass,$(PYTHON) $< "manager" >> $@)
  38. $(call run_grass,$(PYTHON) $< "module_tree" >> $@)
  39. $(call run_grass,$(PYTHON) $< "modeler" >> $@)
  40. $(call run_grass,$(PYTHON) $< "psmap" >> $@)
  41. $(DSTDIR)/xml/module_items.xml: tools/build_modules_xml.py
  42. @echo "Generating interface description for all modules..."
  43. $(call run_grass,$(PYTHON) $< > $@)
  44. $(PYDSTDIRS): %: | $(DSTDIR)
  45. $(MKDIR) $@
  46. $(DSTDIRS): %: | $(DSTDIR)
  47. $(MKDIR) $@
  48. $(DSTDIR):
  49. $(MKDIR) $@