[GRASS-SVN] r39842 - in grass/trunk: general/g.version include/Make
svn_grass at osgeo.org
svn_grass at osgeo.org
Sat Nov 28 00:46:55 EST 2009
Author: glynn
Date: 2009-11-28 00:46:54 -0500 (Sat, 28 Nov 2009)
New Revision: 39842
Modified:
grass/trunk/general/g.version/Makefile
grass/trunk/general/g.version/main.c
grass/trunk/include/Make/Grass.make
Log:
Avoid passing large amounts of data via -D switches
Modified: grass/trunk/general/g.version/Makefile
===================================================================
--- grass/trunk/general/g.version/Makefile 2009-11-28 05:46:17 UTC (rev 39841)
+++ grass/trunk/general/g.version/Makefile 2009-11-28 05:46:54 UTC (rev 39842)
@@ -7,19 +7,24 @@
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_SVN=\"'$(GRASS_VERSION_SVN)'\" -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)
+EXTRA_HEADERS = $(OBJDIR)/copying.h $(OBJDIR)/confparms.h
+
LIBES = $(GISLIB)
DEPENDENCIES = $(GISDEP)
include $(MODULE_TOPDIR)/include/Make/Module.make
-default: cmd $(GRASS_VERSION_FILE) $(GRASS_BUILD_FILE)
+default: cmd
-$(GRASS_VERSION_FILE): $(MODULE_TOPDIR)/COPYING
- cat $< | sed -f sed.script | tr -d '\012' > $@
+$(OBJDIR)/copying.h: $(MODULE_TOPDIR)/COPYING | $(OBJDIR)
+ sed -e 's/^\(.*\)$$/"\1\\n"/' $< > $@
-$(GRASS_BUILD_FILE): $(MODULE_TOPDIR)/config.status
- head -n 7 $< | tail -n 1 | sed 's+#++1' | tr -d '\012' > $@
+$(OBJDIR)/confparms.h: $(MODULE_TOPDIR)/config.status | $(OBJDIR)
+ sed -n '7s/^#\(.*\)$$/"\1"/p' $< > $@
Modified: grass/trunk/general/g.version/main.c
===================================================================
--- grass/trunk/general/g.version/main.c 2009-11-28 05:46:17 UTC (rev 39841)
+++ grass/trunk/general/g.version/main.c 2009-11-28 05:46:54 UTC (rev 39842)
@@ -24,6 +24,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;
Modified: grass/trunk/include/Make/Grass.make
===================================================================
--- grass/trunk/include/Make/Grass.make 2009-11-28 05:46:17 UTC (rev 39841)
+++ grass/trunk/include/Make/Grass.make 2009-11-28 05:46:54 UTC (rev 39842)
@@ -69,9 +69,6 @@
GRASS_VERSION_NUMBER = $(GRASS_VERSION_MAJOR).$(GRASS_VERSION_MINOR).$(GRASS_VERSION_RELEASE)
GRASS_VERSION_NAME = $(GRASS_VERSION_MAJOR)$(GRASS_VERSION_MINOR)$(GRASS_VERSION_RELEASE)
-GRASS_VERSION_FILE = $(ETC)/VERSION
-GRASS_BUILD_FILE = $(ETC)/BUILD
-
##################### other #############################################
COMPILE_FLAGS = $(CPPFLAGS) $(CFLAGS1) $(INCLUDE_DIRS)
More information about the grass-commit
mailing list