Changeset 23119
- Timestamp:
- Mar 3, 2009, 3:27:34 PM (17 years ago)
- Location:
- trunk/ppStats/src
- Files:
-
- 3 edited
-
Makefile.am (modified) (1 diff)
-
ppStats.h (modified) (2 diffs)
-
ppStatsVersion.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ppStats/src/Makefile.am
r19626 r23119 1 1 lib_LTLIBRARIES = libppStats.la 2 libppStats_la_CFLAGS = $(PPSTATS_CFLAGS) $(PSMODULE_CFLAGS) $(PSLIB_CFLAGS) 2 3 PPSTATS_VERSION=`if [ -e ../../VERSION ]; then cat ../../VERSION; else svnversion; fi` 4 PPSTATS_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 PPSTATS_SOURCE=`if [ -e ../../SOURCE ]; then cat ../../SOURCE; else svn info | sed -n -e 's/Repository UUID: // p'; fi` 6 7 # Force recompilation of ppStatsVersion.c, since it gets the version information 8 ppStatsVersion.c: FORCE 9 touch ppStatsVersion.c 10 FORCE: ; 11 12 libppStats_la_CFLAGS = $(PPSTATS_CFLAGS) $(PSMODULE_CFLAGS) $(PSLIB_CFLAGS) -DPPSTATS_VERSION=\"$(PPSTATS_VERSION)\" -DPPSTATS_BRANCH=\"$(PPSTATS_BRANCH)\" -DPPSTATS_SOURCE=\"$(PPSTATS_SOURCE)\" 3 13 libppStats_la_LDFLAGS = $(PPSTATS_LIBS) $(PSMODULE_LIBS) $(PSLIB_LIBS) 4 14 -
trunk/ppStats/src/ppStats.h
r21183 r23119 22 22 psList *summary; // Summary statistics to calculate 23 23 // Options for input data 24 bool doFirstReadout3D; // for 3D data, use the first readout?24 bool doFirstReadout3D; // for 3D data, use the first readout? 25 25 float sample; // Fraction of cell to sample for statistics 26 psImageMaskType maskVal; // Mask value for images26 psImageMaskType maskVal; // Mask value for images 27 27 psList *chips; // Chips to look at 28 28 psList *cells; // Cells to look at … … 108 108 psString ppStatsVersion(void); 109 109 110 /// Return source information 111 psString ppStatsSource(void); 112 110 113 /// Return long version information 111 114 psString ppStatsVersionLong(void); -
trunk/ppStats/src/ppStatsVersion.c
r13993 r23119 1 1 #include "ppStatsInternal.h" 2 3 static const char *cvsTag = "$Name: not supported by cvs2svn $";// CVS tag name4 2 5 3 psString ppStatsVersion(void) 6 4 { 7 psString version = NULL; // Version, to return 8 psStringAppend(&version, "%s-%s",PACKAGE_NAME,PACKAGE_VERSION); 9 return version; 5 #ifndef PPSTATS_VERSION 6 #error "PPSTATS_VERSION is not set" 7 #endif 8 #ifndef PPSTATS_BRANCH 9 #error "PPSTATS_BRANCH is not set" 10 #endif 11 return psStringCopy(PPSTATS_BRANCH "@" PPSTATS_VERSION); 12 } 13 14 psString ppStatsSource(void) 15 { 16 #ifndef PPSTATS_SOURCE 17 #error "PPSTATS_SOURCE is not set" 18 #endif 19 return psStringCopy(PPSTATS_SOURCE); 10 20 } 11 21 12 22 psString ppStatsVersionLong(void) 13 23 { 14 psString version = ppStatsVersion(); // Version, to return 15 psString tag = psStringStripCVS(cvsTag, "Name"); // CVS tag 16 psStringAppend(&version, " (cvs tag %s) %s, %s", tag, __DATE__, __TIME__); 17 psFree(tag); 24 psString version = ppStatsVersion(); // Version, to return 25 psString source = ppStatsSource(); // Source 26 27 psStringPrepend(&version, "ppStats "); 28 psStringAppend(&version, " from %s, built %s, %s", source, __DATE__, __TIME__); 29 psFree(source); 30 31 #ifdef __OPTIMIZE__ 32 psStringAppend(&version, " optimised"); 33 #else 34 psStringAppend(&version, " unoptimised"); 35 #endif 36 18 37 return version; 19 } 38 };
Note:
See TracChangeset
for help on using the changeset viewer.
