[GRASS-SVN] r36560 - grass/trunk/gem

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Apr 2 03:04:37 EDT 2009


Author: neteler
Date: 2009-04-02 03:04:36 -0400 (Thu, 02 Apr 2009)
New Revision: 36560

Modified:
   grass/trunk/gem/Makefile
   grass/trunk/gem/main.c
Log:
define also GRASS_VERSION_MINOR

Modified: grass/trunk/gem/Makefile
===================================================================
--- grass/trunk/gem/Makefile	2009-04-02 06:58:06 UTC (rev 36559)
+++ grass/trunk/gem/Makefile	2009-04-02 07:04:36 UTC (rev 36560)
@@ -1,3 +1,5 @@
+GRASS_VERSION_MAJOR=7
+GRASS_VERSION_MINOR=0
 CC=gcc
 CFLAGS=-g -Wall -pedantic -Werror-implicit-function-declaration -fno-common
 CLIBS=
@@ -29,10 +31,10 @@
 	actions.o \
 	main.o
 
-default: gem7
+default: gem
 
-gem7: $(SRCS) $(HDRS) $(OBJS)
-	$(CC) $(OBJS) -o $@ $(CFLAGS) $(CLIBS) $(LDFLAGS)
+gem: $(SRCS) $(HDRS) $(OBJS)
+	$(CC) $(OBJS) -o $@$(GRASS_VERSION_MAJOR)$(GRASS_VERSION_MINOR) $(CFLAGS) $(CLIBS) $(LDFLAGS)
 
 %.o: %.c
 	$(CC) $(CFLAGS) $(CPPFLAGS) -o $@ -c $<
@@ -53,10 +55,10 @@
 
 main.o:	globals.h
 
-install: gem7
-	strip gem7;
-	cp gem7 /usr/local/bin
+install: gem
+	strip gem$(GRASS_VERSION_MAJOR)$(GRASS_VERSION_MINOR);
+	cp gem$(GRASS_VERSION_MAJOR)$(GRASS_VERSION_MINOR) /usr/local/bin
 
 clean:
-	-rm -f *.o *.bak core *~ gem7
+	-rm -f *.o *.bak core *~ gem$(GRASS_VERSION_MAJOR)$(GRASS_VERSION_MINOR)
 

Modified: grass/trunk/gem/main.c
===================================================================
--- grass/trunk/gem/main.c	2009-04-02 06:58:06 UTC (rev 36559)
+++ grass/trunk/gem/main.c	2009-04-02 07:04:36 UTC (rev 36560)
@@ -147,7 +147,7 @@
 
 void show_help(void)
 {
-    fprintf(stdout, "Usage: gem [OPTION] [ACTION] [FILE|DIR]\n");
+    fprintf(stdout, "Usage: gem70 [OPTION] [ACTION] [FILE|DIR]\n");
     fprintf(stdout, "Install a GRASS extension from FILE or DIR.\n");
     fprintf(stdout, "Manage (installed) GRASS extension(s).\n");
     fprintf(stdout, "\nPossible ACTIONs are:\n");
@@ -203,7 +203,7 @@
 	    "For installation from source code, a C compiler and make tools are needed.\n");
     fprintf(stdout, "\nExample:\n");
     fprintf(stdout,
-	    "\tgem -b macosx --grass=/usr/local/grass-7.0.0 -i myExtension\n");
+	    "\tgem70 -b macosx --grass=/usr/local/grass-7.0.0 -i myExtension\n");
     fprintf(stdout,
 	    "Installs the MacOS X binaries for 'myExtension' in /usr/local/grass-7.0.0.\n");
     exit(0);



More information about the grass-commit mailing list