[GRASS-SVN] r33002 - in grass/trunk: db/base general/g.parser general/manage/cmd gui/wxpython/docs imagery/i.find imagery/i.ortho.photo/photo.2image imagery/i.ortho.photo/photo.2target imagery/i.ortho.photo/photo.camera imagery/i.ortho.photo/photo.elev imagery/i.ortho.photo/photo.init imagery/i.ortho.photo/photo.rectify imagery/i.ortho.photo/photo.target include/Make lib/cairodriver lib/db/sqlp lib/htmldriver lib/pngdriver lib/psdriver raster/r.li/r.li.daemon raster/r.mapcalc raster/r.terraflow raster/r.univar raster/r.watershed/ram raster/r.watershed/seg raster3d/base tools tools/mkftcap vector/v.voronoi visualization/nviz visualization/nviz/src

svn_grass at osgeo.org svn_grass at osgeo.org
Fri Aug 22 11:32:53 EDT 2008


Author: glynn
Date: 2008-08-22 11:32:53 -0400 (Fri, 22 Aug 2008)
New Revision: 33002

Added:
   grass/trunk/include/Make/Etc.make
   grass/trunk/include/Make/NoHtml.make
Modified:
   grass/trunk/db/base/Makefile
   grass/trunk/general/g.parser/Makefile
   grass/trunk/general/manage/cmd/Makefile
   grass/trunk/gui/wxpython/docs/Makefile
   grass/trunk/imagery/i.find/Makefile
   grass/trunk/imagery/i.ortho.photo/photo.2image/Makefile
   grass/trunk/imagery/i.ortho.photo/photo.2target/Makefile
   grass/trunk/imagery/i.ortho.photo/photo.camera/Makefile
   grass/trunk/imagery/i.ortho.photo/photo.elev/Makefile
   grass/trunk/imagery/i.ortho.photo/photo.init/Makefile
   grass/trunk/imagery/i.ortho.photo/photo.rectify/Makefile
   grass/trunk/imagery/i.ortho.photo/photo.target/Makefile
   grass/trunk/include/Make/Dir.make
   grass/trunk/include/Make/Html.make
   grass/trunk/include/Make/Lib.make
   grass/trunk/include/Make/Module.make
   grass/trunk/include/Make/Multi.make
   grass/trunk/include/Make/Script.make
   grass/trunk/lib/cairodriver/Makefile
   grass/trunk/lib/db/sqlp/Makefile
   grass/trunk/lib/htmldriver/Makefile
   grass/trunk/lib/pngdriver/Makefile
   grass/trunk/lib/psdriver/Makefile
   grass/trunk/raster/r.li/r.li.daemon/Makefile
   grass/trunk/raster/r.mapcalc/Makefile
   grass/trunk/raster/r.terraflow/Makefile
   grass/trunk/raster/r.univar/Makefile
   grass/trunk/raster/r.watershed/ram/Makefile
   grass/trunk/raster/r.watershed/seg/Makefile
   grass/trunk/raster3d/base/Makefile
   grass/trunk/tools/mkftcap/Makefile
   grass/trunk/tools/mkhtml.sh
   grass/trunk/vector/v.voronoi/Makefile
   grass/trunk/visualization/nviz/Makefile
   grass/trunk/visualization/nviz/src/Makefile
Log:
Clean up build system, primarily with regard to HTML rules and
directories containing multiple modules


Modified: grass/trunk/db/base/Makefile
===================================================================
--- grass/trunk/db/base/Makefile	2008-08-22 15:30:22 UTC (rev 33001)
+++ grass/trunk/db/base/Makefile	2008-08-22 15:32:53 UTC (rev 33002)
@@ -9,42 +9,12 @@
 
 include $(MODULE_TOPDIR)/include/Make/Multi.make
 
-default: $(patsubst %,$(BIN)/%$(EXE),$(PROGRAMS))
-	$(MAKE) htmlmulti
+default: multi
 
-$(BIN)/db.columns$(EXE): $(OBJDIR)/columns.o
+$(BIN)/db.%$(EXE): $(OBJDIR)/%.o
 	$(CC) $(LDFLAGS) -o $@ $^ $(FMODE_OBJ) $(LIBES) $(XDRLIB) $(MATHLIB)
 
-$(BIN)/db.copy$(EXE): $(OBJDIR)/copy.o
-	$(CC) $(LDFLAGS) -o $@ $^ $(FMODE_OBJ) $(LIBES) $(XDRLIB) $(MATHLIB)
+$(BIN)/db.describe$(EXE): $(OBJDIR)/printtab.o
 
-$(BIN)/db.createdb$(EXE): $(OBJDIR)/createdb.o
-	$(CC) $(LDFLAGS) -o $@ $^ $(FMODE_OBJ) $(LIBES) $(XDRLIB) $(MATHLIB)
+$(BIN)/db.select$(EXE): $(OBJDIR)/printtab.o
 
-$(BIN)/db.dropdb$(EXE): $(OBJDIR)/dropdb.o
-	$(CC) $(LDFLAGS) -o $@ $^ $(FMODE_OBJ) $(LIBES) $(XDRLIB) $(MATHLIB)
-
-$(BIN)/db.droptable$(EXE): $(OBJDIR)/droptable.o
-	$(CC) $(LDFLAGS) -o $@ $^ $(FMODE_OBJ) $(LIBES) $(XDRLIB) $(MATHLIB)
-
-$(BIN)/db.databases$(EXE): $(OBJDIR)/databases.o
-	$(CC) $(LDFLAGS) -o $@ $^ $(FMODE_OBJ) $(LIBES) $(XDRLIB) $(MATHLIB)
-
-$(BIN)/db.describe$(EXE): $(OBJDIR)/describe.o $(OBJDIR)/printtab.o
-	$(CC) $(LDFLAGS) -o $@ $^ $(FMODE_OBJ) $(LIBES) $(XDRLIB) $(MATHLIB)
-
-$(BIN)/db.drivers$(EXE): $(OBJDIR)/drivers.o
-	$(CC) $(LDFLAGS) -o $@ $^ $(FMODE_OBJ) $(LIBES) $(XDRLIB) $(MATHLIB)
-
-$(BIN)/db.execute$(EXE): $(OBJDIR)/execute.o
-	$(CC) $(LDFLAGS) -o $@ $^ $(FMODE_OBJ) $(LIBES) $(XDRLIB) $(MATHLIB)
-
-$(BIN)/db.select$(EXE): $(OBJDIR)/select.o $(OBJDIR)/printtab.o
-	$(CC) $(LDFLAGS) -o $@ $^ $(FMODE_OBJ) $(LIBES) $(XDRLIB) $(MATHLIB)
-
-$(BIN)/db.tables$(EXE): $(OBJDIR)/tables.o
-	$(CC) $(LDFLAGS) -o $@ $^ $(FMODE_OBJ) $(LIBES) $(XDRLIB) $(MATHLIB)
-
-$(BIN)/db.connect$(EXE): $(OBJDIR)/connect.o
-	$(CC) $(LDFLAGS) -o $@ $^ $(FMODE_OBJ) $(LIBES) $(XDRLIB) $(MATHLIB)
-

Modified: grass/trunk/general/g.parser/Makefile
===================================================================
--- grass/trunk/general/g.parser/Makefile	2008-08-22 15:30:22 UTC (rev 33001)
+++ grass/trunk/general/g.parser/Makefile	2008-08-22 15:32:53 UTC (rev 33002)
@@ -10,5 +10,5 @@
 default: cmd
 
 #hardcoded here, this is an exeption due to the g.parser specialities:
-htmlcmd:
-	$(MAKE) $(HTMLDIR)/$(PGM).html HTMLSRC=
+$(PGM).tmp.html:
+	> $@

Modified: grass/trunk/general/manage/cmd/Makefile
===================================================================
--- grass/trunk/general/manage/cmd/Makefile	2008-08-22 15:30:22 UTC (rev 33001)
+++ grass/trunk/general/manage/cmd/Makefile	2008-08-22 15:32:53 UTC (rev 33002)
@@ -16,8 +16,7 @@
 REMOVE_MOD = $(BIN)/g.remove$(EXE)
 RENAME_MOD = $(BIN)/g.rename$(EXE)
 
-default: $(COPY_MOD) $(LIST_MOD) $(REMOVE_MOD) $(RENAME_MOD)
-	$(MAKE) htmlmulti
+default: multi
 
 $(COPY_MOD): $(OBJDIR)/copy.o $(LIST)
 	$(CC) $(LDFLAGS) -o $@ $^ $(FMODE_OBJ) $(LIBES) $(MATHLIB) $(XDRLIB)

Modified: grass/trunk/gui/wxpython/docs/Makefile
===================================================================
--- grass/trunk/gui/wxpython/docs/Makefile	2008-08-22 15:30:22 UTC (rev 33001)
+++ grass/trunk/gui/wxpython/docs/Makefile	2008-08-22 15:32:53 UTC (rev 33002)
@@ -9,5 +9,4 @@
 include $(MODULE_TOPDIR)/include/Make/Grass.make
 include $(MODULE_TOPDIR)/include/Make/Rules.make
 
-default:
-	for file in $(FILES) ; do $(MAKE) htmldir PGM=$$file; done
+default: $(patsubst %,$(HTMLDIR)/%.html,$(FILES))

Modified: grass/trunk/imagery/i.find/Makefile
===================================================================
--- grass/trunk/imagery/i.find/Makefile	2008-08-22 15:30:22 UTC (rev 33001)
+++ grass/trunk/imagery/i.find/Makefile	2008-08-22 15:32:53 UTC (rev 33002)
@@ -5,9 +5,8 @@
 LIBES     = $(GISLIB)
 DEPENDENCIES= $(GISDEP)
 
-include $(MODULE_TOPDIR)/include/Make/Module.make
+include $(MODULE_TOPDIR)/include/Make/Etc.make
+include $(MODULE_TOPDIR)/include/Make/NoHtml.make
 
 default: etc
 
-htmletc:
-	@echo no docs needed for $(PGM)

Modified: grass/trunk/imagery/i.ortho.photo/photo.2image/Makefile
===================================================================
--- grass/trunk/imagery/i.ortho.photo/photo.2image/Makefile	2008-08-22 15:30:22 UTC (rev 33001)
+++ grass/trunk/imagery/i.ortho.photo/photo.2image/Makefile	2008-08-22 15:32:53 UTC (rev 33002)
@@ -7,7 +7,7 @@
 LIBES     = $(IMAGERYLIB) $(DISPLAYLIB) $(RASTERLIB) $(GISLIB) $(IORTHOLIB) $(VASKLIB) $(CURSES) $(GMATHLIB)
 DEPENDENCIES= $(IMAGERYDEP) $(DISPLAYDEP) $(RASTERDEP) $(IORTHODEP) $(GISDEP) $(VASKDEP) $(GMATHDEP)
 
-include $(MODULE_TOPDIR)/include/Make/Module.make
+include $(MODULE_TOPDIR)/include/Make/Etc.make
 
 default: etc
 

Modified: grass/trunk/imagery/i.ortho.photo/photo.2target/Makefile
===================================================================
--- grass/trunk/imagery/i.ortho.photo/photo.2target/Makefile	2008-08-22 15:30:22 UTC (rev 33001)
+++ grass/trunk/imagery/i.ortho.photo/photo.2target/Makefile	2008-08-22 15:32:53 UTC (rev 33002)
@@ -7,6 +7,6 @@
 LIBES     = $(IMAGERYLIB) $(DISPLAYLIB) $(RASTERLIB) $(GISLIB) $(IORTHOLIB) $(VASKLIB) $(CURSES) $(GMATHLIB)
 DEPENDENCIES= $(IMAGERYDEP) $(DISPLAYDEP) $(RASTERDEP) $(IORTHODEP) $(GISDEP) $(VASKDEP) $(GMATHDEP)
 
-include $(MODULE_TOPDIR)/include/Make/Module.make
+include $(MODULE_TOPDIR)/include/Make/Etc.make
 
 default: etc

Modified: grass/trunk/imagery/i.ortho.photo/photo.camera/Makefile
===================================================================
--- grass/trunk/imagery/i.ortho.photo/photo.camera/Makefile	2008-08-22 15:30:22 UTC (rev 33001)
+++ grass/trunk/imagery/i.ortho.photo/photo.camera/Makefile	2008-08-22 15:32:53 UTC (rev 33002)
@@ -7,7 +7,7 @@
 LIBES     = $(IORTHOLIB) $(IMAGERYLIB) $(GISLIB) $(VASKLIB) $(CURSES) $(GMATHLIB)
 DEPENDENCIES= $(IMAGERYDEP) $(IORTHODEP) $(GISDEP) $(VASKDEP) $(GMATHDEP)
 
-include $(MODULE_TOPDIR)/include/Make/Module.make
+include $(MODULE_TOPDIR)/include/Make/Etc.make
 
 default: etc
 

Modified: grass/trunk/imagery/i.ortho.photo/photo.elev/Makefile
===================================================================
--- grass/trunk/imagery/i.ortho.photo/photo.elev/Makefile	2008-08-22 15:30:22 UTC (rev 33001)
+++ grass/trunk/imagery/i.ortho.photo/photo.elev/Makefile	2008-08-22 15:32:53 UTC (rev 33002)
@@ -7,9 +7,8 @@
 LIBES     = $(IMAGERYLIB) $(GISLIB) $(IORTHOLIB) $(VASKLIB) $(CURSES) $(GMATHLIB)
 DEPENDENCIES= $(IMAGERYDEP) $(IORTHODEP) $(GISDEP) $(VASKDEP) $(GMATHDEP)
 
-include $(MODULE_TOPDIR)/include/Make/Module.make
+include $(MODULE_TOPDIR)/include/Make/Etc.make
+include $(MODULE_TOPDIR)/include/Make/NoHtml.make
 
 default: etc
 
-htmletc:
-	@echo no docs needed for $(PGM)

Modified: grass/trunk/imagery/i.ortho.photo/photo.init/Makefile
===================================================================
--- grass/trunk/imagery/i.ortho.photo/photo.init/Makefile	2008-08-22 15:30:22 UTC (rev 33001)
+++ grass/trunk/imagery/i.ortho.photo/photo.init/Makefile	2008-08-22 15:32:53 UTC (rev 33002)
@@ -7,7 +7,7 @@
 LIBES     = $(IORTHOLIB) $(IMAGERYLIB) $(DISPLAYLIB) $(RASTERLIB) $(GISLIB) $(VASKLIB) $(CURSES) $(GMATHLIB)
 DEPENDENCIES= $(IMAGERYDEP) $(DISPLAYDEP) $(RASTERDEP) $(IORTHODEP) $(GISDEP) $(VASKDEP) $(GMATHDEP)
 
-include $(MODULE_TOPDIR)/include/Make/Module.make
+include $(MODULE_TOPDIR)/include/Make/Etc.make
 
 default: etc
 

Modified: grass/trunk/imagery/i.ortho.photo/photo.rectify/Makefile
===================================================================
--- grass/trunk/imagery/i.ortho.photo/photo.rectify/Makefile	2008-08-22 15:30:22 UTC (rev 33001)
+++ grass/trunk/imagery/i.ortho.photo/photo.rectify/Makefile	2008-08-22 15:32:53 UTC (rev 33002)
@@ -9,7 +9,7 @@
 LIBES     = $(IMAGERYLIB) $(GISLIB) $(IORTHOLIB) $(VASKLIB) $(CURSES) $(GMATHLIB)
 DEPENDENCIES= $(IMAGERYDEP) $(IORTHODEP) $(GISDEP) $(VASKDEP) $(GMATHDEP)
 
-include $(MODULE_TOPDIR)/include/Make/Module.make
+include $(MODULE_TOPDIR)/include/Make/Etc.make
 
 default: etc
 

Modified: grass/trunk/imagery/i.ortho.photo/photo.target/Makefile
===================================================================
--- grass/trunk/imagery/i.ortho.photo/photo.target/Makefile	2008-08-22 15:30:22 UTC (rev 33001)
+++ grass/trunk/imagery/i.ortho.photo/photo.target/Makefile	2008-08-22 15:32:53 UTC (rev 33002)
@@ -7,9 +7,8 @@
 LIBES     = $(IMAGERYLIB) $(GISLIB) $(IORTHOLIB) $(VASKLIB) $(CURSES) $(GMATHLIB)
 DEPENDENCIES= $(IMAGERYDEP) $(IORTHODEP) $(GISDEP) $(VASKDEP) $(GMATHDEP)
 
-include $(MODULE_TOPDIR)/include/Make/Module.make
+include $(MODULE_TOPDIR)/include/Make/Etc.make
+include $(MODULE_TOPDIR)/include/Make/NoHtml.make
 
 default: etc
 
-htmletc:
-	@echo No docs needed for $(PGM)

Modified: grass/trunk/include/Make/Dir.make
===================================================================
--- grass/trunk/include/Make/Dir.make	2008-08-22 15:30:22 UTC (rev 33001)
+++ grass/trunk/include/Make/Dir.make	2008-08-22 15:32:53 UTC (rev 33002)
@@ -19,8 +19,10 @@
 	    $(MAKE) -C $$subdir clean; \
 	done
 
-.PHONY: subdirs cleansubdirs parsubdirs $(SUBDIRS)
+htmldir: html
 
+.PHONY: subdirs cleansubdirs parsubdirs htmldir $(SUBDIRS)
+
 parsubdirs: $(SUBDIRS)
 
 $(SUBDIRS):

Added: grass/trunk/include/Make/Etc.make
===================================================================
--- grass/trunk/include/Make/Etc.make	                        (rev 0)
+++ grass/trunk/include/Make/Etc.make	2008-08-22 15:32:53 UTC (rev 33002)
@@ -0,0 +1,17 @@
+
+# common dependencies and rules for building support programs
+
+PACKAGE = "grassmods"
+
+HTMLSRC = $(ETC)/$(PGM)$(EXE)
+
+include $(MODULE_TOPDIR)/include/Make/Platform.make
+include $(MODULE_TOPDIR)/include/Make/Grass.make
+include $(MODULE_TOPDIR)/include/Make/Rules.make
+
+etc: $(ETC)/$(PGM)$(EXE) html
+
+$(ETC)/$(PGM)$(EXE): $(ARCH_CMD_OBJS) $(DEPENDENCIES) 
+	$(CC) $(LDFLAGS) $(XTRA_LDFLAGS) -o $@ $(ARCH_CMD_OBJS) $(FMODE_OBJ) $(LIBES) $(MATHLIB) $(XDRLIB)
+
+.PHONY: etc

Modified: grass/trunk/include/Make/Html.make
===================================================================
--- grass/trunk/include/Make/Html.make	2008-08-22 15:30:22 UTC (rev 33001)
+++ grass/trunk/include/Make/Html.make	2008-08-22 15:32:53 UTC (rev 33002)
@@ -6,21 +6,22 @@
 
 ifdef CROSS_COMPILING
 
-htmlcmd:
+html:
 
-htmlscript:
-
-htmletc:
-
-htmldir:
-
-htmlmulti:
-
 else
 
-$(HTMLDIR)/$(PGM).html: $(PGM).html $(PGM).tmp.html
+htmldesc = \
+	GISRC=$(RUN_GISRC) \
+	GISBASE=$(RUN_GISBASE) \
+	PATH="$(BIN):$$PATH" \
+	PYTHONPATH="$(GISBASE)/etc/python:$$PYTHONPATH" \
+	$(LD_LIBRARY_PATH_VAR)="$(BIN):$(ARCH_LIBDIR):$($(LD_LIBRARY_PATH_VAR))" \
+	LC_ALL=C \
+	$(1) --html-description < /dev/null | grep -v '</body>\|</html>' > $(2)
+
+$(HTMLDIR)/%.html: %.html %.tmp.html
 	-test -d $(HTMLDIR) || $(MKDIR) $(HTMLDIR)
-	$(MODULE_TOPDIR)/tools/mkhtml.sh $(PGM) > $@
+	$(MODULE_TOPDIR)/tools/mkhtml.sh $* > $@
 	-for file in  *.png *.jpg ; do \
 		head -n 1 $$file | grep '^\#!' > /dev/null ; \
 		if [ $$? -ne 0 ] ; then \
@@ -28,36 +29,11 @@
 		fi \
 		done 2> /dev/null ; true
 
-$(PGM).tmp.html: $(HTMLSRC)
-	if [ "$(HTMLSRC)" != "" ] ; then \
-		GISRC=$(RUN_GISRC) \
-		GISBASE=$(RUN_GISBASE) \
-		PATH="$(BIN):$$PATH" \
-		$(LD_LIBRARY_PATH_VAR)="$(BIN):$(ARCH_LIBDIR):$($(LD_LIBRARY_PATH_VAR))" \
-		LC_ALL=C \
-		$(HTMLSRC) --html-description < /dev/null | grep -v '</body>\|</html>' > $@ ; \
-	fi
+%.tmp.html: $(HTMLSRC)
+	if [ "$(HTMLSRC)" != "" ] ; then $(call htmldesc,$<,$@) ; fi
 
-# html rules for cmd commands
-htmlcmd:
-	$(MAKE) $(HTMLDIR)/$(PGM).html HTMLSRC=$(BIN)/$(PGM)$(EXE)
+html: $(HTMLDIR)/$(PGM).html
 
-# html rules for scripts
-htmlscript:
-	$(MAKE) $(HTMLDIR)/$(PGM).html HTMLSRC=$(SCRIPTDIR)/$(PGM)
-
-# html rules for ETC commands
-htmletc:
-	$(MAKE) $(HTMLDIR)/$(PGM).html HTMLSRC=$(ETC)/$(PGM)$(EXE)
-
-# html rules for intro pages in directories
-htmldir:
-	$(MAKE) $(HTMLDIR)/$(PGM).html
-
-# html rules for multiple commands
-htmlmulti:
-	for prog in $(PROGRAMS) ; do $(MAKE) htmlcmd PGM=$$prog ; done
-
 endif
 
-.PHONY: htmlcmd htmletc htmlscript htmldir htmlmulti
+.PHONY: html

Modified: grass/trunk/include/Make/Lib.make
===================================================================
--- grass/trunk/include/Make/Lib.make	2008-08-22 15:30:22 UTC (rev 33001)
+++ grass/trunk/include/Make/Lib.make	2008-08-22 15:32:53 UTC (rev 33002)
@@ -8,7 +8,7 @@
 include $(MODULE_TOPDIR)/include/Make/Grass.make
 
 ifndef LIB_OBJS
-LIB_OBJS = $(subst .c,.o,$(wildcard *.c))
+LIB_OBJS := $(subst .c,.o,$(wildcard *.c))
 endif
 
 ARCH_LIB_OBJS := $(foreach obj,$(LIB_OBJS),$(OBJDIR)/$(obj))
@@ -23,4 +23,4 @@
 include $(MODULE_TOPDIR)/include/Make/Shlib.make
 
 lib: $(GRASS_LIBRARY_TYPE)
-
+	if [ "$(PGM)" != "" -a -f "$(PGM)".html ] ; then $(MAKE) html ; fi

Modified: grass/trunk/include/Make/Module.make
===================================================================
--- grass/trunk/include/Make/Module.make	2008-08-22 15:30:22 UTC (rev 33001)
+++ grass/trunk/include/Make/Module.make	2008-08-22 15:32:53 UTC (rev 33002)
@@ -1,22 +1,17 @@
 
 # common dependencies and rules for building module
 
-PACKAGE ="grassmods"
+PACKAGE = "grassmods"
 
+HTMLSRC = $(BIN)/$(PGM)$(EXE)
+
 include $(MODULE_TOPDIR)/include/Make/Platform.make
 include $(MODULE_TOPDIR)/include/Make/Grass.make
 include $(MODULE_TOPDIR)/include/Make/Rules.make
 
-cmd: $(BIN)/$(PGM)$(EXE)
-	$(MAKE) htmlcmd
+cmd: $(BIN)/$(PGM)$(EXE) html
 
 $(BIN)/$(PGM)$(EXE): $(ARCH_CMD_OBJS) $(DEPENDENCIES) 
 	$(CC) $(LDFLAGS) $(XTRA_LDFLAGS) -o $@ $(ARCH_CMD_OBJS) $(FMODE_OBJ) $(LIBES) $(MATHLIB) $(XDRLIB)
 
-etc: $(ETC)/$(PGM)$(EXE)
-	$(MAKE)  htmletc
-
-$(ETC)/$(PGM)$(EXE): $(ARCH_CMD_OBJS) $(DEPENDENCIES) 
-	$(CC) $(LDFLAGS) $(XTRA_LDFLAGS) -o $@ $(ARCH_CMD_OBJS) $(FMODE_OBJ) $(LIBES) $(MATHLIB) $(XDRLIB)
-
-.PHONY: cmd etc
+.PHONY: cmd

Modified: grass/trunk/include/Make/Multi.make
===================================================================
--- grass/trunk/include/Make/Multi.make	2008-08-22 15:30:22 UTC (rev 33001)
+++ grass/trunk/include/Make/Multi.make	2008-08-22 15:32:53 UTC (rev 33002)
@@ -1,7 +1,17 @@
 
-PACKAGE ="grassmods"
+PACKAGE = "grassmods"
 
 include $(MODULE_TOPDIR)/include/Make/Platform.make
 include $(MODULE_TOPDIR)/include/Make/Grass.make
 include $(MODULE_TOPDIR)/include/Make/Rules.make
 
+multi: progs inter htmlmulti
+
+progs: $(patsubst %,$(BIN)/%$(EXE),$(PROGRAMS))
+
+inter: $(patsubst %,%.tmp.html,$(PROGRAMS))
+
+htmlmulti: $(patsubst %,$(HTMLDIR)/%.html,$(PROGRAMS))
+
+%.tmp.html: $(BIN)/%$(EXE)
+	$(call htmldesc,$<,$@)

Added: grass/trunk/include/Make/NoHtml.make
===================================================================
--- grass/trunk/include/Make/NoHtml.make	                        (rev 0)
+++ grass/trunk/include/Make/NoHtml.make	2008-08-22 15:32:53 UTC (rev 33002)
@@ -0,0 +1,3 @@
+
+$(HTMLDIR)/$(PGM).html:
+	@echo no HTML documentation available

Modified: grass/trunk/include/Make/Script.make
===================================================================
--- grass/trunk/include/Make/Script.make	2008-08-22 15:30:22 UTC (rev 33001)
+++ grass/trunk/include/Make/Script.make	2008-08-22 15:32:53 UTC (rev 33002)
@@ -6,11 +6,13 @@
 
 SCRIPT = $(SCRIPTDIR)/$(PGM)
 
+HTMLSRC = $(SCRIPT)
+
 include $(MODULE_TOPDIR)/include/Make/Platform.make
 include $(MODULE_TOPDIR)/include/Make/Grass.make
 include $(MODULE_TOPDIR)/include/Make/Rules.make
 
-SCRIPT_ACTIONS = $(SCRIPT)
+SCRIPT_ACTIONS = $(SCRIPT) html scriptstrings
 ifdef MINGW
 SCRIPT_ACTIONS += $(BIN)/$(PGM).bat
 endif
@@ -20,12 +22,10 @@
 $(SCRIPTDIR)/%: %.py
 	if [ ! -d $(SCRIPTDIR) ]; then $(MKDIR) $(SCRIPTDIR); fi
 	$(INSTALL) $< $@
-	$(MAKE) htmlscript scriptstrings
 
 $(SCRIPTDIR)/%: %
 	if [ ! -d $(SCRIPTDIR) ]; then $(MKDIR) $(SCRIPTDIR); fi
 	$(INSTALL) $< $@
-	$(MAKE) htmlscript scriptstrings
 
 $(BIN)/$(PGM).bat: $(MODULE_TOPDIR)/scripts/windows_launch.bat
 	sed -e "s#SCRIPT_NAME#$(PGM)#" $(MODULE_TOPDIR)/scripts/windows_launch.bat > $@
@@ -34,16 +34,14 @@
 # These are only the options (parser.c) type things.
 # See locale/scriptstrings/README for more information
 
-scriptstrings = \
+$(STRINGDIR)/$(PGM)_to_translate.c: $(PGM)
 	GISRC=$(RUN_GISRC) \
 	GISBASE=$(RUN_GISBASE) \
 	PATH=$(BIN):$$PATH \
 	$(LD_LIBRARY_PATH_VAR)="$(ARCH_LIBDIR):$($(LD_LIBRARY_PATH_VAR))" \
-	g.parser -t $(1) | sed s/\"/\\\\\"/g | sed 's/.*/_("&")/' > \
+	g.parser -t $(PGM) | sed s/\"/\\\\\"/g | sed 's/.*/_("&")/' > \
 	$(STRINGDIR)/$(PGM)_to_translate.c ; true
 
-$(STRINGDIR)/$(PGM)_to_translate.c: $(PGM)
-	$(call scriptstrings,$(PGM))
-
 scriptstrings: $(STRINGDIR)/$(PGM)_to_translate.c
 
+.PHONY: script htmlscript scriptstrings

Modified: grass/trunk/lib/cairodriver/Makefile
===================================================================
--- grass/trunk/lib/cairodriver/Makefile	2008-08-22 15:30:22 UTC (rev 33001)
+++ grass/trunk/lib/cairodriver/Makefile	2008-08-22 15:32:53 UTC (rev 33002)
@@ -1,7 +1,5 @@
 MODULE_TOPDIR = ../..
 
-include $(MODULE_TOPDIR)/include/Make/Platform.make
-
 EXTRA_CFLAGS=-I../driver $(CAIROINC)
 EXTRA_LIBS=$(DRIVERLIB) $(GISLIB) $(CAIROLIB)
 
@@ -12,7 +10,7 @@
 include $(MODULE_TOPDIR)/include/Make/Lib.make
 
 ifneq ($(USE_CAIRO),)
-default: lib htmldir
+default: lib
 else
 default:
 endif

Modified: grass/trunk/lib/db/sqlp/Makefile
===================================================================
--- grass/trunk/lib/db/sqlp/Makefile	2008-08-22 15:30:22 UTC (rev 33001)
+++ grass/trunk/lib/db/sqlp/Makefile	2008-08-22 15:32:53 UTC (rev 33002)
@@ -15,7 +15,7 @@
 
 include $(MODULE_TOPDIR)/include/Make/Lib.make
 
-default: lib htmldir
+default: lib
 
 y.tab.c y.tab.h: yac.y
 	$(YACC) -d -v yac.y

Modified: grass/trunk/lib/htmldriver/Makefile
===================================================================
--- grass/trunk/lib/htmldriver/Makefile	2008-08-22 15:30:22 UTC (rev 33001)
+++ grass/trunk/lib/htmldriver/Makefile	2008-08-22 15:32:53 UTC (rev 33002)
@@ -1,7 +1,5 @@
 MODULE_TOPDIR = ../..
 
-include $(MODULE_TOPDIR)/include/Make/Platform.make
-
 EXTRA_CFLAGS=-I../driver
 
 EXTRA_LIBS=$(DRIVERLIB) $(GISLIB)
@@ -10,4 +8,4 @@
 
 include $(MODULE_TOPDIR)/include/Make/Lib.make
 
-default: lib htmldir
+default: lib

Modified: grass/trunk/lib/pngdriver/Makefile
===================================================================
--- grass/trunk/lib/pngdriver/Makefile	2008-08-22 15:30:22 UTC (rev 33001)
+++ grass/trunk/lib/pngdriver/Makefile	2008-08-22 15:32:53 UTC (rev 33002)
@@ -37,4 +37,4 @@
 
 include $(MODULE_TOPDIR)/include/Make/Lib.make
 
-default: lib htmldir
+default: lib

Modified: grass/trunk/lib/psdriver/Makefile
===================================================================
--- grass/trunk/lib/psdriver/Makefile	2008-08-22 15:30:22 UTC (rev 33001)
+++ grass/trunk/lib/psdriver/Makefile	2008-08-22 15:32:53 UTC (rev 33002)
@@ -1,7 +1,5 @@
 MODULE_TOPDIR = ../..
 
-include $(MODULE_TOPDIR)/include/Make/Platform.make
-
 EXTRA_CFLAGS=-I../driver
 
 EXTRA_LIBS=$(DRIVERLIB) $(GISLIB)
@@ -10,7 +8,7 @@
 
 include $(MODULE_TOPDIR)/include/Make/Lib.make
 
-default: lib htmldir $(ETC)/psdriver.ps
+default: lib $(ETC)/psdriver.ps
 
 $(ETC)/psdriver.ps: psdriver.ps
 	$(INSTALL_DATA) $< $@

Modified: grass/trunk/raster/r.li/r.li.daemon/Makefile
===================================================================
--- grass/trunk/raster/r.li/r.li.daemon/Makefile	2008-08-22 15:30:22 UTC (rev 33001)
+++ grass/trunk/raster/r.li/r.li.daemon/Makefile	2008-08-22 15:32:53 UTC (rev 33002)
@@ -9,4 +9,4 @@
 
 include $(MODULE_TOPDIR)/include/Make/Lib.make
 
-default: lib htmldir
+default: lib

Modified: grass/trunk/raster/r.mapcalc/Makefile
===================================================================
--- grass/trunk/raster/r.mapcalc/Makefile	2008-08-22 15:30:22 UTC (rev 33001)
+++ grass/trunk/raster/r.mapcalc/Makefile	2008-08-22 15:32:53 UTC (rev 33002)
@@ -7,7 +7,7 @@
 EXTRA_HEADERS = y.tab.h
 EXTRA_CLEAN_FILES = y.tab.c y.tab.h lex.yy.c y.output lex.backup
 
-include $(MODULE_TOPDIR)/include/Make/Module.make
+include $(MODULE_TOPDIR)/include/Make/Multi.make
 
 COMMON = \
 	$(OBJDIR)/y.tab.o \
@@ -85,7 +85,7 @@
 LIBES2 = $(GISLIB) $(BTREELIB) $(ROWIOLIB) $(READLINELIBPATH) $(READLINELIB) $(HISTORYLIB)
 LIBES3 = $(G3DLIB) $(GISLIB) $(BTREELIB) $(READLINELIBPATH) $(READLINELIB) $(HISTORYLIB)
 
-default: $(BIN)/$(PGM2)$(EXE) $(BIN)/$(PGM3)$(EXE) htmlmulti
+default: multi
 
 $(BIN)/$(PGM2)$(EXE): $(LIST2) $(DEPLIBS2)
 	$(CC) $(LDFLAGS) -o $@ $(LIST2) $(FMODE_OBJ) $(LIBES2) $(MATHLIB) $(XDRLIB)

Modified: grass/trunk/raster/r.terraflow/Makefile
===================================================================
--- grass/trunk/raster/r.terraflow/Makefile	2008-08-22 15:30:22 UTC (rev 33001)
+++ grass/trunk/raster/r.terraflow/Makefile	2008-08-22 15:32:53 UTC (rev 33002)
@@ -2,8 +2,14 @@
 
 PGM = r.terraflow
 
-include $(MODULE_TOPDIR)/include/Make/Multi.make
+PACKAGE = "grassmods"
 
+HTMLSRC = $(BIN)/$(PGM)$(EXE)
+
+include $(MODULE_TOPDIR)/include/Make/Platform.make
+include $(MODULE_TOPDIR)/include/Make/Grass.make
+include $(MODULE_TOPDIR)/include/Make/Rules.make
+
 SOURCES = main.cc common.cc stats.cc fill.cc types.cc ccforest.cc \
 	nodata.cc plateau.cc direction.cc water.cc  \
 	filldepr.cc grid.cc genericWindow.cc \
@@ -37,8 +43,7 @@
 endif
 	$(CXX) -c $(CXXFLAGS) $(NLS_CFLAGS) -DELEV_SHORT $< -o $@
 
-default: $(BIN)/$(PGM)$(EXE) $(BIN)/$(PGM).short$(EXE)
-	$(MAKE) htmlcmd
+default: $(BIN)/$(PGM)$(EXE) $(BIN)/$(PGM).short$(EXE) html
 
 $(OBJARCH)/FLOAT:
 	$(MKDIR) $@

Modified: grass/trunk/raster/r.univar/Makefile
===================================================================
--- grass/trunk/raster/r.univar/Makefile	2008-08-22 15:30:22 UTC (rev 33001)
+++ grass/trunk/raster/r.univar/Makefile	2008-08-22 15:32:53 UTC (rev 33002)
@@ -4,7 +4,6 @@
 LIBES = $(G3DLIB) $(GISLIB)
 DEPENDENCIES = $(G3DDEP) $(GISDEP)
 
-#needed for htmlmulti
 PROGRAMS = r.univar r3.univar
 
 include $(MODULE_TOPDIR)/include/Make/Multi.make
@@ -12,12 +11,7 @@
 R3UNIVAR = $(BIN)/r3.univar$(EXE)
 RUNIVAR = $(BIN)/r.univar$(EXE)
 
-default: $(R3UNIVAR) $(RUNIVAR)
-	$(MAKE) htmlmulti
+default: multi
 
-$(RUNIVAR): $(OBJDIR)/r.univar_main.o $(OBJDIR)/sort.o $(OBJDIR)/stats.o
+$(BIN)/%$(EXE): $(OBJDIR)/%_main.o $(OBJDIR)/sort.o $(OBJDIR)/stats.o
 	$(CC) $(LDFLAGS) -o $@ $^ $(FMODE_OBJ) $(LIBES) $(XDRLIB) $(MATHLIB)
-
-$(R3UNIVAR): $(OBJDIR)/r3.univar_main.o $(OBJDIR)/sort.o $(OBJDIR)/stats.o
-	$(CC) $(LDFLAGS) -o $@ $^ $(FMODE_OBJ) $(LIBES) $(XDRLIB) $(MATHLIB)
-

Modified: grass/trunk/raster/r.watershed/ram/Makefile
===================================================================
--- grass/trunk/raster/r.watershed/ram/Makefile	2008-08-22 15:30:22 UTC (rev 33001)
+++ grass/trunk/raster/r.watershed/ram/Makefile	2008-08-22 15:32:53 UTC (rev 33002)
@@ -5,9 +5,7 @@
 LIBES = $(GISLIB)
 DEPENDENCIES = $(GISDEP)
 
-include $(MODULE_TOPDIR)/include/Make/Module.make
+include $(MODULE_TOPDIR)/include/Make/Etc.make
+include $(MODULE_TOPDIR)/include/Make/NoHtml.make
 
 default: etc 
-
-htmletc:
-	@echo "No docs to generate." 

Modified: grass/trunk/raster/r.watershed/seg/Makefile
===================================================================
--- grass/trunk/raster/r.watershed/seg/Makefile	2008-08-22 15:30:22 UTC (rev 33001)
+++ grass/trunk/raster/r.watershed/seg/Makefile	2008-08-22 15:32:53 UTC (rev 33002)
@@ -5,9 +5,8 @@
 LIBES = $(GISLIB) $(SEGMENTLIB)
 DEPENDENCIES = $(GISDEP) $(SEGMENTDEP)
 
-include $(MODULE_TOPDIR)/include/Make/Module.make
+include $(MODULE_TOPDIR)/include/Make/Etc.make
+include $(MODULE_TOPDIR)/include/Make/NoHtml.make
 
 default: etc
 
-htmletc:
-	@echo "No docs to generate."

Modified: grass/trunk/raster3d/base/Makefile
===================================================================
--- grass/trunk/raster3d/base/Makefile	2008-08-22 15:30:22 UTC (rev 33001)
+++ grass/trunk/raster3d/base/Makefile	2008-08-22 15:32:53 UTC (rev 33002)
@@ -4,28 +4,15 @@
 LIBES = $(G3DLIB) $(GISLIB)
 DEPENDENCIES = $(G3DDEP) $(GISDEP)
 
-#needed for htmlmulti
 PROGRAMS = r3.info r3.mask r3.null r3.timestamp
 
 include $(MODULE_TOPDIR)/include/Make/Multi.make
 
-R3INFO = $(BIN)/r3.info$(EXE)
-R3MASK = $(BIN)/r3.mask$(EXE)
-R3NULL = $(BIN)/r3.null$(EXE)
-R3TIMESTAMP = $(BIN)/r3.timestamp$(EXE)
+default: multi
 
-default: $(R3INFO) $(R3MASK) $(R3NULL) $(R3TIMESTAMP)
-	$(MAKE) htmlmulti
-
-$(R3MASK): $(OBJDIR)/r3.mask.main.o $(OBJDIR)/mask_functions.o
+$(BIN)/r3.%$(EXE): $(OBJDIR)/r3.%.main.o $(OBJDIR)/mask_functions.o
 	$(CC) $(LDFLAGS) -o $@ $^ $(FMODE_OBJ) $(LIBES) $(XDRLIB) $(MATHLIB)
 
-$(R3NULL): $(OBJDIR)/r3.null.main.o $(OBJDIR)/mask_functions.o
-	$(CC) $(LDFLAGS) -o $@ $^ $(FMODE_OBJ) $(LIBES) $(XDRLIB) $(MATHLIB)
+$(BIN)/r3.mask$(EXE): $(OBJDIR)/mask_functions.o
 
-$(R3TIMESTAMP): $(OBJDIR)/r3.timestamp.main.o 
-	$(CC) $(LDFLAGS) -o $@ $^ $(FMODE_OBJ) $(LIBES) $(XDRLIB) $(MATHLIB)
-
-$(R3INFO): $(OBJDIR)/r3.info.main.o 
-	$(CC) $(LDFLAGS) -o $@ $^ $(FMODE_OBJ) $(LIBES) $(XDRLIB) $(MATHLIB)
-
+$(BIN)/r3.null$(EXE): $(OBJDIR)/mask_functions.o

Modified: grass/trunk/tools/mkftcap/Makefile
===================================================================
--- grass/trunk/tools/mkftcap/Makefile	2008-08-22 15:30:22 UTC (rev 33001)
+++ grass/trunk/tools/mkftcap/Makefile	2008-08-22 15:32:53 UTC (rev 33002)
@@ -5,11 +5,9 @@
 CAPFILE = $(ETC)/freetypecap
 
 include $(MODULE_TOPDIR)/include/Make/Script.make
+include $(MODULE_TOPDIR)/include/Make/NoHtml.make
 
 default: script
 
 $(CAPFILE): $(SCRIPTDIR)/$(PGM)
 	$< > $@
-
-htmlscript:
-	@true

Modified: grass/trunk/tools/mkhtml.sh
===================================================================
--- grass/trunk/tools/mkhtml.sh	2008-08-22 15:30:22 UTC (rev 33001)
+++ grass/trunk/tools/mkhtml.sh	2008-08-22 15:32:53 UTC (rev 33002)
@@ -34,11 +34,6 @@
     if [ -f "${PGM}.tmp.html" ] ; then
 	grep -iv '</body>\|</html>' "${PGM}.tmp.html"
     fi
-else
-    if [ -f "${PGM}.tmp.html" ] ; then
-	echo '***' "${PGM}.tmp.html" >&2
-	exit 1
-    fi
 fi
 
 cat "${PGM}.html"

Modified: grass/trunk/vector/v.voronoi/Makefile
===================================================================
--- grass/trunk/vector/v.voronoi/Makefile	2008-08-22 15:30:22 UTC (rev 33001)
+++ grass/trunk/vector/v.voronoi/Makefile	2008-08-22 15:32:53 UTC (rev 33002)
@@ -25,8 +25,7 @@
 
 DELAUNAY_ARCH_OBJS := $(foreach obj,$(DELAUNAY_OBJS),$(OBJDIR)/$(obj))
 
-default: $(BIN)/$(DELAUNAY)$(EXE) $(BIN)/$(VORONOI)$(EXE)
-	$(MAKE) htmlmulti
+default: multi
 
 $(BIN)/$(VORONOI)$(EXE): $(VORONOI_ARCH_OBJS)
 	$(CC) $(LDFLAGS) -o $@ $^ $(FMODE_OBJ) $(LIBES) $(MATHLIB) $(XDRLIB)

Modified: grass/trunk/visualization/nviz/Makefile
===================================================================
--- grass/trunk/visualization/nviz/Makefile	2008-08-22 15:30:22 UTC (rev 33001)
+++ grass/trunk/visualization/nviz/Makefile	2008-08-22 15:32:53 UTC (rev 33002)
@@ -26,7 +26,7 @@
 	$(MAKE) -C src
 	$(MAKE) install
 	$(MAKE) -C html
-	$(MAKE) htmldir
+	$(MAKE) html
 
 # Install the scripts in the appropriate directory
 install:

Modified: grass/trunk/visualization/nviz/src/Makefile
===================================================================
--- grass/trunk/visualization/nviz/src/Makefile	2008-08-22 15:30:22 UTC (rev 33001)
+++ grass/trunk/visualization/nviz/src/Makefile	2008-08-22 15:32:53 UTC (rev 33002)
@@ -54,7 +54,6 @@
 
 EXTRA_CLEAN_FILES = nvwish$(EXE)
 
-#default: $(BIN)/$(PGM) htmlcmd
 default: nvwish$(EXE)
 
 nvwish$(EXE): $(ARCH_OBJS) $(VECTDEP) $(BITMAPDEP) $(LINKMDEP) $(FORMDEP) $(DBMIDEP $(GISDEP)



More information about the grass-commit mailing list