- Timestamp:
- Mar 17, 2009, 12:07:42 PM (17 years ago)
- Location:
- branches/cnb_branches/cnb_branch_20090301/psModules
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
src/config/pmVersion.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/cnb_branches/cnb_branch_20090301/psModules
-
Property svn:mergeinfo
set to (toggle deleted branches)
/branches/cnb_branches/cnb_branch_20090215/psModules merged eligible /trunk/psModules merged eligible /branches/cnb_branch_20090215/psModules 21495-22685 /branches/eam_branches/eam_branch_20090303/psModules 23158-23228
-
Property svn:mergeinfo
set to (toggle deleted branches)
-
branches/cnb_branches/cnb_branch_20090301/psModules/src/config/pmVersion.c
r10291 r23351 8 8 #include "pmVersion.h" 9 9 10 static const char *cvsTag = "$Name: not supported by cvs2svn $";// CVS tag name 10 #ifndef PSMODULES_VERSION 11 #error "PSMODULES_VERSION is not set" 12 #endif 13 #ifndef PSMODULES_BRANCH 14 #error "PSMODULES_BRANCH is not set" 15 #endif 16 #ifndef PSMODULES_SOURCE 17 #error "PSMODULES_SOURCE is not set" 18 #endif 19 20 #define xstr(s) str(s) 21 #define str(s) #s 11 22 12 23 psString psModulesVersion(void) 13 24 { 14 psString version = NULL; // Version, to return15 psStringAppend(&v ersion, "%s-%s",PACKAGE_NAME,PACKAGE_VERSION);16 return v ersion;25 char *value = NULL; 26 psStringAppend(&value, "%s@%s", xstr(PSMODULES_BRANCH), xstr(PSMODULES_VERSION)); 27 return value; 17 28 } 29 30 psString psModulesSource(void) 31 { 32 return psStringCopy(xstr(PSMODULES_SOURCE)); 33 } 34 18 35 19 36 psString psModulesVersionLong(void) 20 37 { 21 psString version = psModulesVersion(); // Version, to return22 psString tag = psStringStripCVS(cvsTag, "Name"); // CVS tag38 psString version = psModulesVersion(); // Version, to return 39 psString source = psModulesSource(); // Source 23 40 24 psStringAppend(&version, " (cvs tag %s) %s, %s", tag, __DATE__, __TIME__); 41 psStringPrepend(&version, "psModules "); 42 psStringAppend(&version, " from %s, built %s, %s", source, __DATE__, __TIME__); 43 psFree(source); 25 44 26 psFree(tag); 45 #ifdef __OPTIMIZE__ 46 psStringAppend(&version, " optimised"); 47 #else 48 psStringAppend(&version, " unoptimised"); 49 #endif 50 51 #ifdef HAVE_NEBCLIENT 52 psStringAppend(&version, " with nebclient"); 53 #else 54 psStringAppend(&version, " without nebclient"); 55 #endif 56 27 57 return version; 58 }; 59 60 61 bool psModulesVersionHeader(psMetadata *header) 62 { 63 PS_ASSERT_METADATA_NON_NULL(header, false); 64 65 psString version = psModulesVersion(); // Software version 66 psString source = psModulesSource(); // Software source 67 68 psStringPrepend(&version, "psModules version: "); 69 psStringPrepend(&source, "psModules source: "); 70 71 psMetadataAddStr(header, PS_LIST_TAIL, "HISTORY", PS_META_DUPLICATE_OK, NULL, version); 72 psMetadataAddStr(header, PS_LIST_TAIL, "HISTORY", PS_META_DUPLICATE_OK, NULL, source); 73 74 psFree(version); 75 psFree(source); 76 77 return true; 28 78 }
Note:
See TracChangeset
for help on using the changeset viewer.
