Changeset 23143
- Timestamp:
- Mar 3, 2009, 3:55:15 PM (17 years ago)
- Location:
- trunk/ppStack/src
- Files:
-
- 3 edited
-
Makefile.am (modified) (1 diff)
-
ppStack.h (modified) (1 diff)
-
ppStackVersion.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ppStack/src/Makefile.am
r19337 r23143 1 1 bin_PROGRAMS = ppStack 2 2 3 ppStack_CFLAGS = $(PSLIB_CFLAGS) $(PSMODULE_CFLAGS) $(PSPHOT_CFLAGS) $(PPSTATS_CFLAGS) $(PPSTACK_CFLAGS) 3 PPSTACK_VERSION=`if [ -e ../../VERSION ]; then cat ../../VERSION; else svnversion; fi` 4 PPSTACK_BRANCH=`if [ -e ../../BRANCH ]; then cat ../../BRANCH; else svn info | sed -n -e '/URL:/ h' -e '/Repository Root:/ { x; H; x; s|Repository Root: \(.*\)\nURL: \1\(.*\)|\2| ; s|^/|| ; s|/[a-zA-Z]*/src.*|| ; p }'; fi` 5 PPSTACK_SOURCE=`if [ -e ../../SOURCE ]; then cat ../../SOURCE; else svn info | sed -n -e 's/Repository UUID: // p'; fi` 6 7 # Force recompilation of ppStackVersion.c, since it gets the version information 8 ppStackVersion.c: FORCE 9 touch ppStackVersion.c 10 FORCE: ; 11 12 ppStack_CFLAGS = $(PSLIB_CFLAGS) $(PSMODULE_CFLAGS) $(PSPHOT_CFLAGS) $(PPSTATS_CFLAGS) $(PPSTACK_CFLAGS) -DPPSTACK_VERSION=\"$(PPSTACK_VERSION)\" -DPPSTACK_BRANCH=\"$(PPSTACK_BRANCH)\" -DPPSTACK_SOURCE=\"$(PPSTACK_SOURCE)\" 4 13 ppStack_LDFLAGS = $(PSLIB_LIBS) $(PSMODULE_LIBS) $(PSPHOT_LIBS) $(PPSTATS_LIBS) $(PPSTACK_LIBS) 5 14 -
trunk/ppStack/src/ppStack.h
r21477 r23143 134 134 psString ppStackVersion(void); 135 135 136 /// Return software source 137 psString ppStackSource(void); 138 136 139 // Return long description of software version 137 140 psString ppStackVersionLong(void); -
trunk/ppStack/src/ppStackVersion.c
r18419 r23143 10 10 #include "ppStack.h" 11 11 12 static const char *cvsTag = "$Name: not supported by cvs2svn $";// CVS tag name13 14 12 psString ppStackVersion(void) 15 13 { 16 psString version = NULL; // Version, to return 17 psStringAppend(&version, "%s-%s",PACKAGE_NAME,PACKAGE_VERSION); 18 return version; 14 #ifndef PPSTACK_VERSION 15 #error "PPSTACK_VERSION is not set" 16 #endif 17 #ifndef PPSTACK_BRANCH 18 #error "PPSTACK_BRANCH is not set" 19 #endif 20 return psStringCopy(PPSTACK_BRANCH "@" PPSTACK_VERSION); 21 } 22 23 psString ppStackSource(void) 24 { 25 #ifndef PPSTACK_SOURCE 26 #error "PPSTACK_SOURCE is not set" 27 #endif 28 return psStringCopy(PPSTACK_SOURCE); 19 29 } 20 30 21 31 psString ppStackVersionLong(void) 22 32 { 23 psString version = ppStackVersion(); // Version, to return 24 psString tag = psStringStripCVS(cvsTag, "Name"); // CVS tag 25 psStringAppend(&version, " (cvs tag %s) %s, %s", tag, __DATE__, __TIME__); 26 psFree(tag); 33 psString version = ppStackVersion(); // Version, to return 34 psString source = ppStackSource(); // Source 35 36 psStringPrepend(&version, "ppStack "); 37 psStringAppend(&version, " from %s, built %s, %s", source, __DATE__, __TIME__); 38 psFree(source); 39 40 #ifdef __OPTIMIZE__ 41 psStringAppend(&version, " optimised"); 42 #else 43 psStringAppend(&version, " unoptimised"); 44 #endif 45 27 46 return version; 28 } 47 }; 29 48 30 49
Note:
See TracChangeset
for help on using the changeset viewer.
