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

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Dec 5 04:59:27 PST 2012


Author: martinl
Date: 2012-12-05 04:59:27 -0800 (Wed, 05 Dec 2012)
New Revision: 54199

Added:
   grass/trunk/include/Make/HtmlRules.make
Modified:
   grass/trunk/include/Make/GuiScript.make
   grass/trunk/include/Make/Html.make
Log:
add HtmlRules.make, update Html.make and GuiScript.make to use HtmlRules.make


Modified: grass/trunk/include/Make/GuiScript.make
===================================================================
--- grass/trunk/include/Make/GuiScript.make	2012-12-05 12:14:45 UTC (rev 54198)
+++ grass/trunk/include/Make/GuiScript.make	2012-12-05 12:59:27 UTC (rev 54199)
@@ -4,17 +4,13 @@
 include $(MODULE_TOPDIR)/include/Make/Vars.make
 include $(MODULE_TOPDIR)/include/Make/Rules.make
 include $(MODULE_TOPDIR)/include/Make/ScriptRules.make
+include $(MODULE_TOPDIR)/include/Make/HtmlRules.make
 
 MODULES  := $(patsubst g.gui.%.py,%,$(wildcard g.gui.*.py))
 CMDHTML  := $(patsubst %,$(HTMLDIR)/g.gui.%.html,$(MODULES))
 GUIHTML  := $(patsubst %,$(HTMLDIR)/wxGUI.%.html,$(MODULES))
 PYFILES  := $(patsubst %,$(SCRIPTDIR)/g.gui.%,$(MODULES))
 
-IMGSRC   := $(wildcard *.png) $(wildcard *.jpg)
-IMGDST   := $(patsubst %,$(HTMLDIR)/%,$(IMGSRC))
-
-htmldesc = $(call run_grass,$(1) --html-description < /dev/null | grep -v '</body>\|</html>' > $(2))
-
 guiscript: $(CMDHTML) $(GUIHTML) $(IMGDST) $(PYFILES)
 
 $(HTMLDIR)/g.gui.%.html: g.gui.%.html g.gui.%.tmp.html | $(HTMLDIR)
@@ -29,9 +25,3 @@
 
 $(SCRIPTDIR)/g.gui.%: g.gui.%.py | $(SCRIPTDIR)
 	$(INSTALL) $< $@
-
-$(HTMLDIR)/%.png: %.png | $(HTMLDIR)
-	$(INSTALL_DATA) $< $@
-
-$(HTMLDIR)/%.jpg: %.jpg | $(HTMLDIR)
-	$(INSTALL_DATA) $< $@

Modified: grass/trunk/include/Make/Html.make
===================================================================
--- grass/trunk/include/Make/Html.make	2012-12-05 12:14:45 UTC (rev 54198)
+++ grass/trunk/include/Make/Html.make	2012-12-05 12:59:27 UTC (rev 54199)
@@ -1,24 +1,11 @@
 
 # generic html rules for all commands
 
-htmldesc = $(call run_grass,$(1) --html-description < /dev/null | grep -v '</body>\|</html>' > $(2))
+include $(MODULE_TOPDIR)/include/Make/HtmlRules.make
 
-IMGSRC := $(wildcard *.png) $(wildcard *.jpg)
-IMGDST := $(patsubst %,$(HTMLDIR)/%,$(IMGSRC))
-
 $(HTMLDIR)/%.html: %.html %.tmp.html $(HTMLSRC) $(IMGDST) | $(HTMLDIR)
 	$(PYTHON) $(GISBASE)/tools/mkhtml.py $* $(GRASS_VERSION_DATE) > $@
 
-ifneq ($(strip $(IMGDST)),)
-.SECONDARY: $(IMGDST)
-endif
-
-$(HTMLDIR)/%.png: %.png | $(HTMLDIR)
-	$(INSTALL_DATA) $< $@
-
-$(HTMLDIR)/%.jpg: %.jpg | $(HTMLDIR)
-	$(INSTALL_DATA) $< $@
-
 $(MANDIR)/%.$(MANSECT): $(HTMLDIR)/%.html
 	$(HTML2MAN) $< $@
 

Added: grass/trunk/include/Make/HtmlRules.make
===================================================================
--- grass/trunk/include/Make/HtmlRules.make	                        (rev 0)
+++ grass/trunk/include/Make/HtmlRules.make	2012-12-05 12:59:27 UTC (rev 54199)
@@ -0,0 +1,17 @@
+
+# common html rules (included by Html.make and GuiScript.make)
+
+htmldesc = $(call run_grass,$(1) --html-description < /dev/null | grep -v '</body>\|</html>' > $(2))
+
+IMGSRC := $(wildcard *.png) $(wildcard *.jpg)
+IMGDST := $(patsubst %,$(HTMLDIR)/%,$(IMGSRC))
+
+ifneq ($(strip $(IMGDST)),)
+.SECONDARY: $(IMGDST)
+endif
+
+$(HTMLDIR)/%.png: %.png | $(HTMLDIR)
+	$(INSTALL_DATA) $< $@
+
+$(HTMLDIR)/%.jpg: %.jpg | $(HTMLDIR)
+	$(INSTALL_DATA) $< $@


Property changes on: grass/trunk/include/Make/HtmlRules.make
___________________________________________________________________
Added: svn:mime-type
   + text/plain
Added: svn:keywords
   + Author Date Id
Added: svn:eol-style
   + native



More information about the grass-commit mailing list