Changeset 23144
- Timestamp:
- Mar 3, 2009, 3:57:24 PM (17 years ago)
- Location:
- trunk/ppSub/src
- Files:
-
- 2 edited
-
Makefile.am (modified) (1 diff)
-
ppSubVersion.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ppSub/src/Makefile.am
r21257 r23144 1 1 bin_PROGRAMS = ppSub ppSubKernel 2 2 3 ppSub_CPPFLAGS = $(PSLIB_CFLAGS) $(PSMODULE_CFLAGS) $(PPSTATS_CFLAGS) $(PSPHOT_CFLAGS) $(PPSUB_CFLAGS) 3 PPSUB_VERSION=`if [ -e ../../VERSION ]; then cat ../../VERSION; else svnversion; fi` 4 PPSUB_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 PPSUB_SOURCE=`if [ -e ../../SOURCE ]; then cat ../../SOURCE; else svn info | sed -n -e 's/Repository UUID: // p'; fi` 6 7 # Force recompilation of ppSubVersion.c, since it gets the version information 8 ppSubVersion.c: FORCE 9 touch ppSubVersion.c 10 FORCE: ; 11 12 ppSub_CPPFLAGS = $(PSLIB_CFLAGS) $(PSMODULE_CFLAGS) $(PPSTATS_CFLAGS) $(PSPHOT_CFLAGS) $(PPSUB_CFLAGS) -DPPSUB_VERSION=\"$(PPSUB_VERSION)\" -DPPSUB_BRANCH=\"$(PPSUB_BRANCH)\" -DPPSUB_SOURCE=\"$(PPSUB_SOURCE)\" 4 13 ppSub_LDFLAGS = $(PSLIB_LIBS) $(PSMODULE_LIBS) $(PPSTATS_LIBS) $(PSPHOT_LIBS) $(PPSUB_LIBS) 5 14 -
trunk/ppSub/src/ppSubVersion.c
r21524 r23144 22 22 #include "ppSub.h" 23 23 24 static const char *cvsTag = "$Name: not supported by cvs2svn $";///< CVS tag name25 26 24 psString ppSubVersion(void) 27 25 { 28 psString version = NULL; // Version, to return 29 psStringAppend(&version, "%s-%s",PACKAGE_NAME,PACKAGE_VERSION); 30 return version; 26 #ifndef PPSUB_VERSION 27 #error "PPSUB_VERSION is not set" 28 #endif 29 #ifndef PPSUB_BRANCH 30 #error "PPSUB_BRANCH is not set" 31 #endif 32 return psStringCopy(PPSUB_BRANCH "@" PPSUB_VERSION); 33 } 34 35 psString ppSubSource(void) 36 { 37 #ifndef PPSUB_SOURCE 38 #error "PPSUB_SOURCE is not set" 39 #endif 40 return psStringCopy(PPSUB_SOURCE); 31 41 } 32 42 33 43 psString ppSubVersionLong(void) 34 44 { 35 psString version = ppSubVersion(); // 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 = ppSubVersion(); // Version, to return 46 psString source = ppSubSource(); // Source 47 48 psStringPrepend(&version, "ppSub "); 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 } 59 }; 41 60 42 61
Note:
See TracChangeset
for help on using the changeset viewer.
