Changeset 23145
- Timestamp:
- Mar 3, 2009, 4:01:12 PM (17 years ago)
- Location:
- trunk/pswarp/src
- Files:
-
- 3 edited
-
Makefile.am (modified) (1 diff)
-
pswarp.h (modified) (1 diff)
-
pswarpVersion.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/pswarp/src/Makefile.am
r18839 r23145 1 1 bin_PROGRAMS = pswarp 2 pswarp_CPPFLAGS = $(PSLIB_CFLAGS) $(PSMODULE_CFLAGS) $(PPSTATS_CFLAGS) $(PSPHOT_CFLAGS) $(PSWARP_CFLAGS) 2 3 PSWARP_VERSION=`if [ -e ../../VERSION ]; then cat ../../VERSION; else svnversion; fi` 4 PSWARP_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 PSWARP_SOURCE=`if [ -e ../../SOURCE ]; then cat ../../SOURCE; else svn info | sed -n -e 's/Repository UUID: // p'; fi` 6 7 # Force recompilation of pswarpVersion.c, since it gets the version information 8 pswarpVersion.c: FORCE 9 touch pswarpVersion.c 10 FORCE: ; 11 12 pswarp_CPPFLAGS = $(PSLIB_CFLAGS) $(PSMODULE_CFLAGS) $(PPSTATS_CFLAGS) $(PSPHOT_CFLAGS) $(PSWARP_CFLAGS) -DPSWARP_VERSION=\"$(PSWARP_VERSION)\" -DPSWARP_BRANCH=\"$(PSWARP_BRANCH)\" -DPSWARP_SOURCE=\"$(PSWARP_SOURCE)\" 3 13 pswarp_LDFLAGS = $(PSLIB_LIBS) $(PSMODULE_LIBS) $(PPSTATS_LIBS) $(PSPHOT_LIBS) $(PSWARP_LIBS) 4 14 -
trunk/pswarp/src/pswarp.h
r21368 r23145 112 112 */ 113 113 bool pswarpSetThreads (); 114 115 /// Return software version 116 psString pswarpVersion(void); 117 118 /// Return software souce 119 psString pswarpSource(void); 120 121 /// Return long software version information 122 psString pswarpVersionLong(void); -
trunk/pswarp/src/pswarpVersion.c
r21323 r23145 20 20 #include "pswarp.h" 21 21 22 static const char *cvsTag = "$Name: not supported by cvs2svn $";///< CVS tag name23 22 24 23 psString pswarpVersion(void) 25 24 { 26 psString version = NULL; ///< Version, to return 27 psStringAppend(&version, "%s-%s",PACKAGE_NAME,PACKAGE_VERSION); 28 return version; 25 #ifndef PSWARP_VERSION 26 #error "PSWARP_VERSION is not set" 27 #endif 28 #ifndef PSWARP_BRANCH 29 #error "PSWARP_BRANCH is not set" 30 #endif 31 return psStringCopy(PSWARP_BRANCH "@" PSWARP_VERSION); 32 } 33 34 psString pswarpSource(void) 35 { 36 #ifndef PSWARP_SOURCE 37 #error "PSWARP_SOURCE is not set" 38 #endif 39 return psStringCopy(PSWARP_SOURCE); 29 40 } 30 41 31 42 psString pswarpVersionLong(void) 32 43 { 33 psString version = pswarpVersion(); ///< Version, to return 34 psString tag = psStringStripCVS(cvsTag, "Name"); ///< CVS tag 35 psStringAppend(&version, " (cvs tag %s) %s, %s", tag, __DATE__, __TIME__); 36 psFree(tag); 44 psString version = pswarpVersion(); // Version, to return 45 psString source = pswarpSource(); // Source 46 47 psStringPrepend(&version, "pswarp "); 48 psStringAppend(&version, " from %s, built %s, %s", source, __DATE__, __TIME__); 49 psFree(source); 50 51 #ifdef __OPTIMIZE__ 52 psStringAppend(&version, " optimised"); 53 #else 54 psStringAppend(&version, " unoptimised"); 55 #endif 56 37 57 return version; 38 } 39 58 };
Note:
See TracChangeset
for help on using the changeset viewer.
