[GRASS-SVN] r62956 - grass/trunk/include/Make

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Nov 26 00:48:02 PST 2014


Author: martinl
Date: 2014-11-26 00:48:02 -0800 (Wed, 26 Nov 2014)
New Revision: 62956

Modified:
   grass/trunk/include/Make/GuiScript.make
Log:
wingrass: generate bat files also for GUI modules

Modified: grass/trunk/include/Make/GuiScript.make
===================================================================
--- grass/trunk/include/Make/GuiScript.make	2014-11-26 08:47:29 UTC (rev 62955)
+++ grass/trunk/include/Make/GuiScript.make	2014-11-26 08:48:02 UTC (rev 62956)
@@ -3,12 +3,6 @@
 
 include $(MODULE_TOPDIR)/include/Make/Vars.make
 
-ifdef MINGW
-SCRIPTEXT = .py
-else
-SCRIPTEXT = 
-endif
-
 include $(MODULE_TOPDIR)/include/Make/Rules.make
 include $(MODULE_TOPDIR)/include/Make/ScriptRules.make
 include $(MODULE_TOPDIR)/include/Make/HtmlRules.make
@@ -16,9 +10,16 @@
 MODULES  := $(patsubst g.gui.%.py,%,$(wildcard g.gui.*.py))
 CMDHTML  := $(patsubst %,$(HTMLDIR)/g.gui.%.html,$(MODULES))
 GUIHTML  := $(patsubst %,$(HTMLDIR)/wxGUI.%.html,$(MODULES))
+ifdef MINGW
+SCRIPTEXT = .py
+BATFILES  := $(patsubst %,$(BIN)/g.gui.%.bat,$(MODULES))
+else
+SCRIPTEXT = 
+BATFILES =
+endif
 PYFILES  := $(patsubst %,$(SCRIPTDIR)/g.gui.%$(SCRIPTEXT),$(MODULES))
 
-guiscript: $(IMGDST) $(PYFILES)
+guiscript: $(IMGDST) $(PYFILES) $(BATFILES)
 	$(MAKE) $(CMDHTML)
 	-rm -f g.gui.*.tmp.html
 	$(MAKE) $(GUIHTML)
@@ -38,4 +39,8 @@
 $(SCRIPTDIR)/g.gui.%$(SCRIPTEXT): g.gui.%.py | $(SCRIPTDIR)
 	$(INSTALL) $< $@
 
+$(BIN)/g.gui.%.bat: $(MODULE_TOPDIR)/scripts/windows_launch.bat
+	sed -e "s#SCRIPT_NAME#g.gui.$(*)#" -e "s#SCRIPT_DIR#%GISBASE%/scripts#" $(MODULE_TOPDIR)/scripts/windows_launch.bat > $@
+	unix2dos $@
+
 .PHONY: guiscript



More information about the grass-commit mailing list