[GRASS-SVN] r36693 - grass/branches/releasebranch_6_4/include/Make
svn_grass at osgeo.org
svn_grass at osgeo.org
Sun Apr 12 04:43:52 EDT 2009
Author: neteler
Date: 2009-04-12 04:43:52 -0400 (Sun, 12 Apr 2009)
New Revision: 36693
Added:
grass/branches/releasebranch_6_4/include/Make/Man.make
Modified:
grass/branches/releasebranch_6_4/include/Make/Module.make
grass/branches/releasebranch_6_4/include/Make/Rules.make
grass/branches/releasebranch_6_4/include/Make/Script.make
Log:
'make install' target added
Added: grass/branches/releasebranch_6_4/include/Make/Man.make
===================================================================
--- grass/branches/releasebranch_6_4/include/Make/Man.make (rev 0)
+++ grass/branches/releasebranch_6_4/include/Make/Man.make 2009-04-12 08:43:52 UTC (rev 36693)
@@ -0,0 +1,64 @@
+# some definitions
+SECT = 1
+MANDIR = $(ARCH_DISTDIR)/man/man$(SECT)
+HTMLDIR = $(ARCH_DISTDIR)/docs/html
+HTML2MAN = GRASS_PERL=${PERL} VERSION_NUMBER=${GRASS_VERSION_NUMBER} sh $(GRASS_HOME)/tools/g.html2man/g.html2man
+
+# generic man rules for all commands
+
+ifdef CROSS_COMPILING
+
+mancmd:
+
+manscript:
+
+manetc:
+
+mandir:
+
+manmulti:
+
+else
+
+ifeq ($(PERL),no)
+
+mancmd:
+
+manscript:
+
+manetc:
+
+mandir:
+
+manmulti:
+
+else
+
+$(MANDIR)/$(PGM).${SECT}: $(MANSRC)
+ $(HTML2MAN) $< $@ $(SECT)
+
+# man rules for cmd commands
+mancmd:
+ $(MAKE) $(MANDIR)/$(PGM).${SECT} MANSRC=$(HTMLDIR)/$(PGM).html
+
+# man rules for scripts
+manscript:
+ $(MAKE) $(MANDIR)/$(PGM).${SECT} MANSRC=$(HTMLDIR)/$(PGM).html
+
+# man rules for ETC commands
+manetc:
+ $(MAKE) $(MANDIR)/$(PGM).${SECT} MANSRC=$(HTMLDIR)/$(PGM).html
+
+# man rules for intro pages in directories
+mandir:
+ $(MAKE) $(MANDIR)/$(PGM).${SECT} MANSRC=$(HTMLDIR)/$(PGM).html
+
+# man rules for multiple commands
+manmulti:
+ for prog in $(PROGRAMS) ; do $(MAKE) mancmd PGM=$$prog ; done
+
+endif
+
+endif
+
+.PHONY: mancmd manetc manscript mandir manmulti
Modified: grass/branches/releasebranch_6_4/include/Make/Module.make
===================================================================
--- grass/branches/releasebranch_6_4/include/Make/Module.make 2009-04-12 02:33:09 UTC (rev 36692)
+++ grass/branches/releasebranch_6_4/include/Make/Module.make 2009-04-12 08:43:52 UTC (rev 36693)
@@ -9,14 +9,21 @@
cmd: $(BIN)/$(PGM)$(EXE)
$(MAKE) htmlcmd
+ $(MAKE) mancmd
$(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
+ $(MAKE) manetc
$(ETC)/$(PGM)$(EXE): $(ARCH_CMD_OBJS) $(DEPENDENCIES)
$(CC) $(LDFLAGS) $(XTRA_LDFLAGS) -o $@ $(ARCH_CMD_OBJS) $(FMODE_OBJ) $(LIBES) $(MATHLIB) $(XDRLIB)
-.PHONY: cmd etc
+install:
+ $(INSTALL) $(ARCH_DISTDIR)/bin/$(PGM)$(EXE) $(INST_DIR)/bin/
+ $(INSTALL_DATA) $(HTMLDIR)/$(PGM).html $(INST_DIR)/docs/html/
+ $(INSTALL_DATA) $(ARCH_DISTDIR)/man/man1/$(PGM).1 $(INST_DIR)/man/man1/
+
+.PHONY: cmd etc install
Modified: grass/branches/releasebranch_6_4/include/Make/Rules.make
===================================================================
--- grass/branches/releasebranch_6_4/include/Make/Rules.make 2009-04-12 02:33:09 UTC (rev 36692)
+++ grass/branches/releasebranch_6_4/include/Make/Rules.make 2009-04-12 08:43:52 UTC (rev 36693)
@@ -79,3 +79,6 @@
# HTML page rules:
include $(MODULE_TOPDIR)/include/Make/Html.make
+
+# MAN page rules:
+include $(MODULE_TOPDIR)/include/Make/Man.make
Modified: grass/branches/releasebranch_6_4/include/Make/Script.make
===================================================================
--- grass/branches/releasebranch_6_4/include/Make/Script.make 2009-04-12 02:33:09 UTC (rev 36692)
+++ grass/branches/releasebranch_6_4/include/Make/Script.make 2009-04-12 08:43:52 UTC (rev 36693)
@@ -42,3 +42,7 @@
scriptstrings: $(STRINGDIR)/$(PGM)_to_translate.c
+install:
+ $(INSTALL) $(ARCH_DISTDIR)/scripts/$(PGM)$(EXE) $(INST_DIR)/scripts/
+ $(INSTALL_DATA) $(HTMLDIR)/$(PGM).html $(INST_DIR)/docs/html/
+ $(INSTALL_DATA) $(ARCH_DISTDIR)/man/man1/$(PGM).1 $(INST_DIR)/man/man1/
More information about the grass-commit
mailing list