Changeset 23124
- Timestamp:
- Mar 3, 2009, 3:37:49 PM (17 years ago)
- Location:
- trunk/ppArith/src
- Files:
-
- 2 edited
-
Makefile.am (modified) (1 diff)
-
ppArithVersion.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ppArith/src/Makefile.am
r15571 r23124 1 1 bin_PROGRAMS = ppArith 2 ppArith_CPPFLAGS = $(PSLIB_CFLAGS) $(PSMODULE_CFLAGS) $(PPSTATS_CFLAGS) $(PSPHOT_CFLAGS) $(PPARITH_CFLAGS) 2 3 PPARITH_VERSION=`if [ -e ../../VERSION ]; then cat ../../VERSION; else svnversion; fi` 4 PPARITH_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 PPARITH_SOURCE=`if [ -e ../../SOURCE ]; then cat ../../SOURCE; else svn info | sed -n -e 's/Repository UUID: // p'; fi` 6 7 # Force recompilation of ppArithVersion.c, since it gets the version information 8 ppArithVersion.c: FORCE 9 touch ppArith.c 10 FORCE: ; 11 12 ppArith_CPPFLAGS = $(PSLIB_CFLAGS) $(PSMODULE_CFLAGS) $(PPSTATS_CFLAGS) $(PSPHOT_CFLAGS) $(PPARITH_CFLAGS) -DPPARITH_VERSION=\"$(PPARITH_VERSION)\" -DPPARITH_BRANCH=\"$(PPARITH_BRANCH)\" -DPPARITH_SOURCE=\"$(PPARITH_SOURCE)\" 3 13 ppArith_LDFLAGS = $(PSLIB_LIBS) $(PSMODULE_LIBS) $(PPSTATS_LIBS) $(PSPHOT_LIBS) $(PPARITH_LIBS) 4 14 -
trunk/ppArith/src/ppArithVersion.c
r21378 r23124 22 22 #include "ppArith.h" 23 23 24 static const char *cvsTag = "$Name: not supported by cvs2svn $";///< CVS tag name25 26 24 psString ppArithVersion(void) 27 25 { 28 psString version = NULL; // Version, to return 29 psStringAppend(&version, "%s-%s",PACKAGE_NAME,PACKAGE_VERSION); 30 return version; 26 #ifndef PPARITH_VERSION 27 #error "PPARITH_VERSION is not set" 28 #endif 29 #ifndef PPARITH_BRANCH 30 #error "PPARITH_BRANCH is not set" 31 #endif 32 return psStringCopy(PPARITH_BRANCH "@" PPARITH_VERSION); 33 } 34 35 psString ppArithSource(void) 36 { 37 #ifndef PPARITH_SOURCE 38 #error "PPARITH_SOURCE is not set" 39 #endif 40 return psStringCopy(PPARITH_SOURCE); 31 41 } 32 42 33 43 psString ppArithVersionLong(void) 34 44 { 35 psString version = ppArithVersion(); // Version, to return 36 psString tag = psStringStripCVS(cvsTag, "Name"); // CVS tag 37 psStringAppend(&version, " (cvs tag %s) %s, %s", tag, __DATE__, __TIME__); 38 psFree(tag); 45 psString version = ppArithVersion(); // Version, to return 46 psString source = ppArithSource(); // Source 47 48 psStringPrepend(&version, "ppArith "); 49 psStringAppend(&version, " from %s, built %s, %s", source, __DATE__, __TIME__); 50 psFree(source); 51 52 #ifdef __OPTIMIZE__ 53 psStringAppend(&version, " optimised"); 54 #else 55 psStringAppend(&version, " unoptimised"); 56 #endif 57 39 58 return version; 40 } 41 59 }; 42 60 43 61 void ppArithVersionMetadata(psMetadata *metadata)
Note:
See TracChangeset
for help on using the changeset viewer.
