Changeset 23797 for trunk/ppSim/src
- Timestamp:
- Apr 9, 2009, 10:34:47 PM (17 years ago)
- Location:
- trunk/ppSim/src
- Files:
-
- 1 added
- 3 edited
-
. (modified) (1 prop)
-
Makefile.am (modified) (1 diff)
-
ppSimVersion.c (modified) (3 diffs)
-
ppSimVersionDefinitions.h.in (added)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ppSim/src
- Property svn:ignore
-
old new 8 8 .libs 9 9 ppSimSequence 10 ppSimVersionDefinitions.h
-
- Property svn:ignore
-
trunk/ppSim/src/Makefile.am
r23790 r23797 1 1 bin_PROGRAMS = ppSim ppSimSequence 2 2 3 if HAVE_SVNVERSION 4 PPSIM_VERSION=`$(SVNVERSION) ../..` 5 else 6 PPSIM_VERSION="UNKNOWN" 7 endif 8 9 if HAVE_SVN 10 PPSIM_BRANCH=`$(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 }'` 11 PPSIM_SOURCE=`$(SVN) info | $(SED) -n -e 's/Repository UUID: // p'` 12 else 13 PPSIM_BRANCH="UNKNOWN" 14 PPSIM_SOURCE="UNKNOWN" 15 endif 16 3 17 # Force recompilation of ppSimVersion.c, since it gets the version information 4 ppSimVersion.c: FORCE 5 touch ppSimVersion.c 18 ppSimVersion.c: ppSimVersionDefinitions.h 19 ppSimVersionDefinitions.h: ppSimVersionDefinitions.h.in FORCE 20 -$(RM) ppSimVersionDefinitions.h 21 $(SED) -e "s|@PPSIM_VERSION@|\"$(PPSIM_VERSION)\"|" -e "s|@PPSIM_BRANCH@|\"$(PPSIM_BRANCH)\"|" -e "s|@PPSIM_SOURCE@|\"$(PPSIM_SOURCE)\"|" ppSimVersionDefinitions.h.in > ppSimVersionDefinitions.h 6 22 FORCE: ; 7 23 8 ppSim_CPPFLAGS = $(PSLIB_CFLAGS) $(PSMODULE_CFLAGS) $(PSPHOT_CFLAGS) $(PSASTRO_CFLAGS) $(ppSim_CFLAGS) -DPPSIM_VERSION=$(PPSIM_VERSION) -DPPSIM_BRANCH=$(PPSIM_BRANCH) -DPPSIM_SOURCE=$(PPSIM_SOURCE)24 ppSim_CPPFLAGS = $(PSLIB_CFLAGS) $(PSMODULE_CFLAGS) $(PSPHOT_CFLAGS) $(PSASTRO_CFLAGS) $(ppSim_CFLAGS) 9 25 ppSim_LDFLAGS = $(PSLIB_LIBS) $(PSMODULE_LIBS) $(PSPHOT_LIBS) $(PSASTRO_LIBS) 10 26 ppSim_SOURCES = \ -
trunk/ppSim/src/ppSimVersion.c
r23229 r23797 1 1 #include "ppSim.h" 2 #include "ppSimVersionDefinitions.h" 2 3 3 4 #ifndef PPSIM_VERSION … … 11 12 #endif 12 13 13 #define xstr(s) str(s)14 #define str(s) #s15 16 14 psString ppSimVersion(void) 17 15 { 18 16 char *value = NULL; 19 psStringAppend(&value, "%s@%s", xstr(PPSIM_BRANCH), xstr(PPSIM_VERSION));17 psStringAppend(&value, "%s@%s", PPSIM_BRANCH, PPSIM_VERSION); 20 18 return value; 21 19 } … … 23 21 psString ppSimSource(void) 24 22 { 25 return psStringCopy( xstr(PPSIM_SOURCE));23 return psStringCopy(PPSIM_SOURCE); 26 24 } 27 25
Note:
See TracChangeset
for help on using the changeset viewer.
