[GRASS-SVN] r37704 - in grass/trunk: . general/g.version man tools

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Jun 2 10:28:54 EDT 2009


Author: glynn
Date: 2009-06-02 10:28:54 -0400 (Tue, 02 Jun 2009)
New Revision: 37704

Added:
   grass/trunk/grassrc.tmpl
Modified:
   grass/trunk/Makefile
   grass/trunk/general/g.version/Makefile
   grass/trunk/man/Makefile
   grass/trunk/tools/build_html_index.sh
Log:
Fix g.version and documentation indices when building against installed GRASS


Modified: grass/trunk/Makefile
===================================================================
--- grass/trunk/Makefile	2009-06-02 11:11:27 UTC (rev 37703)
+++ grass/trunk/Makefile	2009-06-02 14:28:54 UTC (rev 37704)
@@ -404,12 +404,7 @@
 builddemolocation:
 	test -d ${ARCH_DISTDIR} || ${MAKE_DIR_CMD} ${ARCH_DISTDIR}
 	-tar cBf - demolocation | (cd ${ARCH_DISTDIR}/ ; tar xBfo - ) 2>/dev/null
-	@ echo "GISDBASE: ${RUN_GISBASE}" > ${RUN_GISRC}
-	@ echo "LOCATION_NAME: demolocation" >> ${RUN_GISRC}
-	@ echo "MAPSET: PERMANENT" >> ${RUN_GISRC}
-	@ echo "GRASS_DB_ENCODING: utf-8" >> ${RUN_GISRC}
-	@ echo "DEBUG: 0" >> ${RUN_GISRC}
-	@ echo "GRASS_GUI: text" >> ${RUN_GISRC}
+	sed 's!@GISDBASE@!$(ARCH_DISTDIR)!' < grassrc.tmpl > $(ARCH_DISTDIR)/demolocation/.grassrc$(GRASS_VERSION_MAJOR)$(GRASS_VERSION_MINOR)
 
 .PHONY: default libs cleandistdirs cleanscriptstrings clean libsclean
 .PHONY: distclean strip install real-install install-strip install-macosx

Modified: grass/trunk/general/g.version/Makefile
===================================================================
--- grass/trunk/general/g.version/Makefile	2009-06-02 11:11:27 UTC (rev 37703)
+++ grass/trunk/general/g.version/Makefile	2009-06-02 14:28:54 UTC (rev 37704)
@@ -4,8 +4,8 @@
 
 # cat the COPYING file, add a c line-break \n at each line end
 # and remove the unix newline. 
-COPYING := $(shell cat ./../../COPYING | sed -f sed.script | tr -d '\012')
-GRASS_CONFIGURE_PARAMS := $(shell head -n 7 ./../../config.status | tail -n 1 | tr -d '\012')
+COPYING := $(shell cat $(MODULE_TOPDIR)/COPYING | sed -f sed.script | tr -d '\012')
+GRASS_CONFIGURE_PARAMS := $(shell head -n 7 $(MODULE_TOPDIR)/config.status | tail -n 1 | tr -d '\012')
 
 EXTRA_CFLAGS=-DGRASS_VERSION_NUMBER=\"'$(GRASS_VERSION_NUMBER)'\" -DGRASS_VERSION_DATE=\"'$(GRASS_VERSION_DATE)'\" -DGRASS_VERSION_UPDATE_PKG=\"'$(GRASS_VERSION_UPDATE_PKG)'\"  -DGRASS_CONFIGURE_PARAMS="\"$(GRASS_CONFIGURE_PARAMS)\"" -DCOPYING="\"$(COPYING)\""
 
@@ -19,5 +19,5 @@
 $(GRASS_VERSION_FILE): $(MODULE_TOPDIR)/COPYING
 	cat $< | sed -f sed.script | tr -d '\012' > $@
 
-$(GRASS_BUILD_FILE): ../../config.status
+$(GRASS_BUILD_FILE): $(MODULE_TOPDIR)/config.status
 	head -n 7 $< | tail -n 1 | sed 's+#++1' | tr -d '\012' > $@

Added: grass/trunk/grassrc.tmpl
===================================================================
--- grass/trunk/grassrc.tmpl	                        (rev 0)
+++ grass/trunk/grassrc.tmpl	2009-06-02 14:28:54 UTC (rev 37704)
@@ -0,0 +1,6 @@
+GISDBASE: @GISDBASE@
+LOCATION_NAME: demolocation
+MAPSET: PERMANENT
+GRASS_DB_ENCODING: utf-8
+DEBUG: 0
+GRASS_GUI: text

Modified: grass/trunk/man/Makefile
===================================================================
--- grass/trunk/man/Makefile	2009-06-02 11:11:27 UTC (rev 37703)
+++ grass/trunk/man/Makefile	2009-06-02 14:28:54 UTC (rev 37704)
@@ -8,4 +8,6 @@
 	$(MAKE) $(MANPAGES)
 
 indices:
-	cd ../tools && sh build_html_index.sh
+	cd ../tools && \
+	GISBASE="$(GISBASE)" ARCH="$(ARCH)" ARCH_DISTDIR="$(ARCH_DISTDIR)" \
+	sh build_html_index.sh

Modified: grass/trunk/tools/build_html_index.sh
===================================================================
--- grass/trunk/tools/build_html_index.sh	2009-06-02 11:11:27 UTC (rev 37703)
+++ grass/trunk/tools/build_html_index.sh	2009-06-02 14:28:54 UTC (rev 37704)
@@ -35,11 +35,10 @@
 EXCLUDEHTML="`echo "$EXCLUDEMODS" | tr ' ' '|' | sed -e 's+\.+\\\\.+g' -e 's+|+\\\\|+g'`"
 
 #fetch the ARCH for store the files:
-ARCH="`cat ../include/Make/Platform.make | grep '^ARCH'  | sed 's+ ++g' | cut -d'=' -f2`"
 GEMDIR="../gem"
-HTMLDIR="../dist.$ARCH/docs/html"
-GRASSVERSION=`cat ../dist.$ARCH/etc/VERSIONNUMBER`
-GRASS_MMVER=`cut -d . -f 1-2 ../dist.$ARCH/etc/VERSIONNUMBER`
+HTMLDIR="$ARCH_DISTDIR/docs/html"
+GRASSVERSION=`cat "$GISBASE/etc/VERSIONNUMBER"`
+GRASS_MMVER=`cut -d . -f 1-2 "$GISBASE/etc/VERSIONNUMBER"`
 MACOSX=`echo $ARCH | grep -i darwin`
 
 



More information about the grass-commit mailing list