[GRASS-SVN] r39844 - grass/branches/develbranch_6/general/g.version
svn_grass at osgeo.org
svn_grass at osgeo.org
Sat Nov 28 11:33:33 EST 2009
Author: martinl
Date: 2009-11-28 11:33:32 -0500 (Sat, 28 Nov 2009)
New Revision: 39844
Modified:
grass/branches/develbranch_6/general/g.version/Makefile
grass/branches/develbranch_6/general/g.version/main.c
Log:
glynn: Avoid passing large amounts of data via -D switches
Modified: grass/branches/develbranch_6/general/g.version/Makefile
===================================================================
--- grass/branches/develbranch_6/general/g.version/Makefile 2009-11-28 08:20:54 UTC (rev 39843)
+++ grass/branches/develbranch_6/general/g.version/Makefile 2009-11-28 16:33:32 UTC (rev 39844)
@@ -7,16 +7,24 @@
COPYING=`cat ./../../COPYING | sed -f sed.script | tr -d '\012'`
GRASS_CONFIGURE_PARAMS=`head -n 7 ./../../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)\""
+EXTRA_CFLAGS = \
+ -DGRASS_VERSION_NUMBER=\"'$(GRASS_VERSION_NUMBER)'\" \
+ -DGRASS_VERSION_DATE=\"'$(GRASS_VERSION_DATE)'\" \
+ -DGRASS_VERSION_SVN=\"'$(GRASS_VERSION_SVN)'\" \
+ -DGRASS_VERSION_UPDATE_PKG=\"'$(GRASS_VERSION_UPDATE_PKG)'\" \
+ -I$(OBJDIR)
-LIBES = $(GISLIB)
-DEPENDENCIES= $(GISDEP)
+EXTRA_HEADERS = $(OBJDIR)/copying.h $(OBJDIR)/confparms.h
+LIBES = $(GISLIB)
+DEPENDENCIES = $(GISDEP)
+
include $(MODULE_TOPDIR)/include/Make/Module.make
-default: cmd COPYING GRASS_CONFIGURE_PARAMS
+default: cmd
-COPYING:
- cat ./../../COPYING | sed -f sed.script | tr -d '\012' > $(GRASS_VERSION_FILE)
-GRASS_CONFIGURE_PARAMS:
- head -n 7 ./../../config.status | tail -n 1 | sed 's+#++1' | tr -d '\012' > $(GRASS_BUILD_FILE)
+$(OBJDIR)/copying.h: $(MODULE_TOPDIR)/COPYING | $(OBJDIR)
+ sed -e 's/^\(.*\)$$/"\1\\n"/' $< > $@
+
+$(OBJDIR)/confparms.h: $(MODULE_TOPDIR)/config.status | $(OBJDIR)
+ sed -n '7s/^#\(.*\)$$/"\1"/p' $< > $@
Modified: grass/branches/develbranch_6/general/g.version/main.c
===================================================================
--- grass/branches/develbranch_6/general/g.version/main.c 2009-11-28 08:20:54 UTC (rev 39843)
+++ grass/branches/develbranch_6/general/g.version/main.c 2009-11-28 16:33:32 UTC (rev 39844)
@@ -23,6 +23,14 @@
#define GRASS_VERSION_UPDATE_PKG "0.1"
#endif
+static const char COPYING[] =
+#include "copying.h"
+;
+
+static const char GRASS_CONFIGURE_PARAMS[] =
+#include "confparms.h"
+;
+
int main(int argc, char *argv[])
{
struct GModule *module;
More information about the grass-commit
mailing list