فهرست منبع

Move creation of copying.h, confparms.h from general/g.version to include
Remove cruft


git-svn-id: https://svn.osgeo.org/grass/grass/trunk@40665 15284696-431f-4ddb-bdfa-cd5b030d7da7

Glynn Clements 15 سال پیش
والد
کامیت
7892196d66
4فایلهای تغییر یافته به همراه10 افزوده شده و 15 حذف شده
  1. 1 11
      general/g.version/Makefile
  2. 2 2
      general/g.version/main.c
  3. 0 1
      general/g.version/sed.script
  4. 7 1
      include/Makefile

+ 1 - 11
general/g.version/Makefile

@@ -4,17 +4,12 @@ PGM=g.version
 
 # cat the COPYING file, add a c line-break \n at each line end
 # and remove the unix newline. 
-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)'\" \
-	-I$(OBJDIR)
-
-EXTRA_HEADERS = $(OBJDIR)/copying.h $(OBJDIR)/confparms.h
+	-DGRASS_VERSION_UPDATE_PKG=\"'$(GRASS_VERSION_UPDATE_PKG)'\"
 
 LIBES = $(GISLIB)
 DEPENDENCIES = $(GISDEP)
@@ -23,8 +18,3 @@ include $(MODULE_TOPDIR)/include/Make/Module.make
 
 default: cmd
 
-$(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' $< > $@

+ 2 - 2
general/g.version/main.c

@@ -25,11 +25,11 @@
 #endif
 
 static const char COPYING[] =
-#include "copying.h"
+#include <grass/copying.h>
 ;
 
 static const char GRASS_CONFIGURE_PARAMS[] =
-#include "confparms.h"
+#include <grass/confparms.h>
 ;
 
 int main(int argc, char *argv[])

+ 0 - 1
general/g.version/sed.script

@@ -1 +0,0 @@
-s/.*$/&\\n/g

+ 7 - 1
include/Makefile

@@ -5,11 +5,12 @@ include $(MODULE_TOPDIR)/include/Make/Rules.make
 
 SRCH := $(wildcard ../include/*.h ../include/vect/*.h ../include/iostream/*.h)
 DSTH := $(patsubst ../include/%.h,$(ARCH_INCDIR)/%.h,$(SRCH))
+DSTH_EXTRA = $(ARCH_INCDIR)/copying.h $(ARCH_INCDIR)/confparms.h
 
 SRCMAKE := $(wildcard ../include/Make/*.make)
 DSTMAKE := $(patsubst ../include/Make/%.make,$(ARCH_DISTDIR)/include/Make/%.make,$(SRCMAKE))
 
-default: $(DSTH) $(DSTMAKE)
+default: $(DSTH) $(DSTH_EXTRA) $(DSTMAKE)
 
 # cancel rule from Rules.make
 $(ARCH_INCDIR)/%.h: %.h
@@ -35,3 +36,8 @@ $(ARCH_DISTDIR)/include/Make/%.make: Make/%.make | $(ARCH_DISTDIR)/include/Make
 $(ARCH_DISTDIR)/include/Make:
 	$(MKDIR) $@
 
+$(ARCH_INCDIR)/copying.h: $(MODULE_TOPDIR)/COPYING | $(ARCH_INCDIR)
+	sed -e 's/^\(.*\)$$/"\1\\n"/' $< > $@
+
+$(ARCH_INCDIR)/confparms.h: $(MODULE_TOPDIR)/config.status | $(ARCH_INCDIR)
+	sed -n '7s/^#\(.*\)$$/"\1"/p' $< > $@