Changeset 23804 for trunk/psastro/src
- Timestamp:
- Apr 9, 2009, 10:51:54 PM (17 years ago)
- Location:
- trunk/psastro/src
- Files:
-
- 1 added
- 3 edited
-
. (modified) (1 prop)
-
Makefile.am (modified) (2 diffs)
-
psastroVersion.c (modified) (3 diffs)
-
psastroVersionDefinitions.h.in (added)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psastro/src
- Property svn:ignore
-
old new 17 17 psastroModelFit 18 18 psastroExtract 19 psastroVersionDefinitions.h
-
- Property svn:ignore
-
trunk/psastro/src/Makefile.am
r23790 r23804 1 1 lib_LTLIBRARIES = libpsastro.la 2 2 3 libpsastro_la_CFLAGS = $(PSASTRO_CFLAGS) $(PPSTATS_CFLAGS) $(PSMODULE_CFLAGS) $(PSLIB_CFLAGS) -DPSASTRO_VERSION=$(PSASTRO_VERSION) -DPSASTRO_BRANCH=$(PSASTRO_BRANCH) -DPSASTRO_SOURCE=$(PSASTRO_SOURCE) 4 libpsastro_la_LDFLAGS = $(PSASTRO_LIBS) $(PPSTATS_LIBS) $(PSMODULE_LIBS) $(PSLIB_LIBS) 3 if HAVE_SVNVERSION 4 PSASTRO_VERSION=`$(SVNVERSION) ../..` 5 else 6 PSASTRO_VERSION="UNKNOWN" 7 endif 8 9 if HAVE_SVN 10 PSASTRO_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 PSASTRO_SOURCE=`$(SVN) info | $(SED) -n -e 's/Repository UUID: // p'` 12 else 13 PSASTRO_BRANCH="UNKNOWN" 14 PSASTRO_SOURCE="UNKNOWN" 15 endif 5 16 6 17 # Force recompilation of psastroVersion.c, since it gets the version information 7 psastroVersion.c: FORCE 8 touch psastroVersion.c 18 psastroVersion.c: psastroVersionDefinitions.h 19 psastroVersionDefinitions.h: psastroVersionDefinitions.h.in FORCE 20 -$(RM) psastroVersionDefinitions.h 21 $(SED) -e "s|@PSASTRO_VERSION@|\"$(PSASTRO_VERSION)\"|" -e "s|@PSASTRO_BRANCH@|\"$(PSASTRO_BRANCH)\"|" -e "s|@PSASTRO_SOURCE@|\"$(PSASTRO_SOURCE)\"|" psastroVersionDefinitions.h.in > psastroVersionDefinitions.h 9 22 FORCE: ; 23 24 libpsastro_la_CFLAGS = $(PSASTRO_CFLAGS) $(PPSTATS_CFLAGS) $(PSMODULE_CFLAGS) $(PSLIB_CFLAGS) 25 libpsastro_la_LDFLAGS = $(PSASTRO_LIBS) $(PPSTATS_LIBS) $(PSMODULE_LIBS) $(PSLIB_LIBS) 10 26 11 27 bin_PROGRAMS = psastro psastroExtract psastroModel psastroModelFit gpcModel … … 121 137 122 138 ### Error codes. 123 BUILT_SOURCES = psastroErrorCodes.h psastroErrorCodes.c 139 BUILT_SOURCES = psastroErrorCodes.h psastroErrorCodes.c psastroVersionDefinitions.h 124 140 CLEANFILES = psastroErrorCodes.h psastroErrorCodes.c 125 141 EXTRA_DIST = psastroErrorCodes.dat psastroErrorCodes.h.in psastroErrorCodes.c.in -
trunk/psastro/src/psastroVersion.c
r23289 r23804 9 9 10 10 #include "psastroInternal.h" 11 #include "psastroVersionDefinitions.h" 11 12 12 13 #ifndef PSASTRO_VERSION … … 20 21 #endif 21 22 22 #define xstr(s) str(s)23 #define str(s) #s24 25 23 psString psastroVersion(void) 26 24 { 27 25 char *value = NULL; 28 psStringAppend(&value, "%s@%s", xstr(PSASTRO_BRANCH), xstr(PSASTRO_VERSION));26 psStringAppend(&value, "%s@%s", PSASTRO_BRANCH, PSASTRO_VERSION); 29 27 return value; 30 28 } … … 32 30 psString psastroSource(void) 33 31 { 34 return psStringCopy( xstr(PSASTRO_SOURCE));32 return psStringCopy(PSASTRO_SOURCE); 35 33 } 36 34
Note:
See TracChangeset
for help on using the changeset viewer.
