Login | Register
My pages Projects Community openCollabNet

Discussions > commits > svn commit: r31 - in trunk: . fsvs/src

fsvs
Discussion topic

Back to topic list

svn commit: r31 - in trunk: . fsvs/src

Author pmarek
Full name P.Marek
Date 2005-10-10 03:26:11 PDT
Message Author: pmarek
Date: Mon Oct 10 03:26:10 2005
New Revision: 31

Modified:
   trunk/ (props changed)
   trunk/fsvs/src/Makefile
   trunk/fsvs/src/fsvs.c
Log:
embed version from URL in binary


Modified: trunk/fsvs/src/Makefile
Url: http://fsvs.tigris.o​rg/source/browse/fsv​s/trunk/fsvs/src/Mak​efile?view=diff&​rev=31&p1=trunk/​fsvs/src/Makefile​&r1=30&p2=trunk​/fsvs/src/Makefile​&r2=31
====================​====================​====================​==================
--- trunk/fsvs/src/Makefile (original)
+++ trunk/fsvs/src/Makefile Mon Oct 10 03:26:10 2005
@@ -13,10 +13,12 @@
 # ie. they'd clutter the dependency files.
 INCS := -idirafter /usr/include/subversion-1 -idirafter /usr/include/apr-0/
 
-CFLAGS := -Wall -g -funsigned-char -D_GNU_SOURCE=1 -D_FILE_OFFSET_BITS=64 -D__USE_FILE_OFFSET64 -DDEBUG $(INCS) -Os
-LDFLAGS := -g -L/usr/local/lib -lsvn_subr-1 -lsvn_ra-1 -lsvn_client-1 -lpcre
 HEADURL := "$URL$"
 HEADREV := "$Revision$"
+VERSION = $(shell perl -e '($$r) = (q( $(HEADREV) ) =~ m:(\d+):); $$t= q( $(HEADURL) ) =~ m:/tags/([^/]+): ? $$1 : "trunk"; print "$$t:$$r\n";' )
+
+CFLAGS := -Wall -g -funsigned-char -D_GNU_SOURCE=1 -D_FILE_OFFSET_BITS=64 -D__USE_FILE_OFFSET64 -DDEBUG $(INCS) -Os '-DFSVS_VERSION="$(VERSION)"'
+LDFLAGS := -g -L/usr/local/lib -lsvn_subr-1 -lsvn_ra-1 -lsvn_client-1 -lpcre
 
 C_FILES := $(wildcard *.c)
 H_FILES := $(wildcard *.h)
@@ -128,6 +130,7 @@
 revcount: count
     @last_rev=$(shell svk info | grep Revision | cut -d" " -f2) ; echo "number of edits up to revision $$last_rev:" ; for r in `seq 2 $$last_rev` ; do svk diff -r`expr $$r - 1`:$$r /svn2/trunk ; done | perl -pe 's#\ssrc/# #g;' | diffstat
 
+
 diffstat:
     svk diff | diffstat
 

Modified: trunk/fsvs/src/fsvs.c
Url: http://fsvs.tigris.o​rg/source/browse/fsv​s/trunk/fsvs/src/fsv​s.c?view=diff&re​v=31&p1=trunk/fs​vs/src/fsvs.c&r1​=30&p2=trunk/fsv​s/src/fsvs.c&r2=​31
====================​====================​====================​==================
--- trunk/fsvs/src/fsvs.c (original)
+++ trunk/fsvs/src/fsvs.c Mon Oct 10 03:26:10 2005
@@ -182,7 +182,7 @@
 {
     static const char Id[]="$Id$";
         
- printf("Version 1.0.1\n");
+ printf("Version " FSVS_VERSION "\n");
     return Id;
 }

« Previous message in topic | 1 of 1 | Next message in topic »

Messages

Show all messages in topic

svn commit: r31 - in trunk: . fsvs/src pmarek P.Marek 2005-10-10 03:26:11 PDT
Messages per page: