Changeset 23229 for trunk/ppSim
- Timestamp:
- Mar 8, 2009, 4:50:46 PM (17 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
-
. (modified) (1 prop)
-
ppSim/src/Makefile.am (modified) (1 diff)
-
ppSim/src/ppSimVersion.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk
-
Property svn:mergeinfo
set to
/branches/eam_branches/eam_branch_20090303 merged eligible
-
Property svn:mergeinfo
set to
-
trunk/ppSim/src/Makefile.am
r23139 r23229 1 1 bin_PROGRAMS = ppSim ppSimSequence 2 2 3 PPSIM_VERSION=`if [ -e ../../VERSION ]; then cat ../../VERSION; else svnversion; fi` 4 PPSIM_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 PPSIM_SOURCE=`if [ -e ../../SOURCE ]; then cat ../../SOURCE; else svn info | sed -n -e 's/Repository UUID: // p'; fi` 3 # PPSIM_VERSION=`if [ -e ../../VERSION ]; then cat ../../VERSION; else svnversion; fi` 4 # PPSIM_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 # PPSIM_SOURCE=`if [ -e ../../SOURCE ]; then cat ../../SOURCE; else svn info | sed -n -e 's/Repository UUID: // p'; fi` 6 # 7 # # Force recompilation of ppSimVersion.c, since it gets the version information 8 # ppSimVersion.c: FORCE 9 # touch ppSimVersion.c 10 # FORCE: ; 6 11 7 # Force recompilation of ppSimVersion.c, since it gets the version information 8 ppSimVersion.c: FORCE 9 touch ppSimVersion.c 10 FORCE: ; 11 12 ppSim_CPPFLAGS = $(PSLIB_CFLAGS) $(PSMODULE_CFLAGS) $(PSPHOT_CFLAGS) $(PSASTRO_CFLAGS) $(ppSim_CFLAGS) -DPPSIM_VERSION=\"$(PPSIM_VERSION)\" -DPPSIM_BRANCH=\"$(PPSIM_BRANCH)\" -DPPSIM_SOURCE=\"$(PPSIM_SOURCE)\" 12 ppSim_CPPFLAGS = $(PSLIB_CFLAGS) $(PSMODULE_CFLAGS) $(PSPHOT_CFLAGS) $(PSASTRO_CFLAGS) $(ppSim_CFLAGS) -DPPSIM_VERSION=$(SVN_VERSION) -DPPSIM_BRANCH=$(SVN_BRANCH) -DPPSIM_SOURCE=$(SVN_SOURCE) 13 13 ppSim_LDFLAGS = $(PSLIB_LIBS) $(PSMODULE_LIBS) $(PSPHOT_LIBS) $(PSASTRO_LIBS) 14 14 ppSim_SOURCES = \ -
trunk/ppSim/src/ppSimVersion.c
r23139 r23229 1 1 #include "ppSim.h" 2 2 3 4 psString ppSimVersion(void)5 {6 3 #ifndef PPSIM_VERSION 7 4 #error "PPSIM_VERSION is not set" … … 10 7 #error "PPSIM_BRANCH is not set" 11 8 #endif 12 return psStringCopy(PPSIM_BRANCH "@" PPSIM_VERSION); 9 #ifndef PPSIM_SOURCE 10 #error "PPSIM_SOURCE is not set" 11 #endif 12 13 #define xstr(s) str(s) 14 #define str(s) #s 15 16 psString ppSimVersion(void) 17 { 18 char *value = NULL; 19 psStringAppend(&value, "%s@%s", xstr(PPSIM_BRANCH), xstr(PPSIM_VERSION)); 20 return value; 13 21 } 14 22 15 23 psString ppSimSource(void) 16 24 { 17 #ifndef PPSIM_SOURCE 18 #error "PPSIM_SOURCE is not set" 19 #endif 20 return psStringCopy(PPSIM_SOURCE); 25 return psStringCopy(xstr(PPSIM_SOURCE)); 21 26 } 22 27
Note:
See TracChangeset
for help on using the changeset viewer.
