Changeset 23793 for trunk/psLib/src/sys
- Timestamp:
- Apr 9, 2009, 10:16:54 PM (17 years ago)
- Location:
- trunk/psLib/src/sys
- Files:
-
- 1 added
- 3 edited
-
. (modified) (1 prop)
-
Makefile.am (modified) (2 diffs)
-
psConfigure.c (modified) (3 diffs)
-
psVersionDefinitions.h.in (added)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/sys
- Property svn:ignore
-
old new 11 11 *.bbg 12 12 *.da 13 psVersionDefinitions.h
-
- Property svn:ignore
-
trunk/psLib/src/sys/Makefile.am
r23787 r23793 3 3 noinst_LTLIBRARIES = libpslibsys.la 4 4 5 if HAVE_SVNVERSION 6 PSLIB_VERSION=`$(SVNVERSION) ../..` 7 else 8 PSLIB_VERSION="UNKNOWN" 9 endif 10 11 if HAVE_SVN 12 PSLIB_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 }'` 13 PSLIB_SOURCE=`$(SVN) info | $(SED) -n -e 's/Repository UUID: // p'` 14 else 15 PSLIB_BRANCH="UNKNOWN" 16 PSLIB_SOURCE="UNKNOWN" 17 endif 18 5 19 # Force recompilation of psConfigure.c, since it gets the version information 6 psConfigure.c: FORCE 7 touch psConfigure.c 20 psConfigure.c: psVersionDefinitions.h 21 psVersionDefinitions.h: psVersionDefinitions.h.in FORCE 22 -$(RM) psVersionDefinitions.h 23 $(SED) -e "s|@PSLIB_VERSION@|\"$(PSLIB_VERSION)\"|" -e "s|@PSLIB_BRANCH@|\"$(PSLIB_BRANCH)\"|" -e "s|@PSLIB_SOURCE@|\"$(PSLIB_SOURCE)\"|" psVersionDefinitions.h.in > psVersionDefinitions.h 8 24 FORCE: ; 9 25 10 libpslibsys_la_CPPFLAGS = $(SRCINC) $(PSLIB_CFLAGS) $(CFITSIO_CFLAGS) -DPSLIB_VERSION=$(PSLIB_VERSION) -DPSLIB_BRANCH=$(PSLIB_BRANCH) -DPSLIB_SOURCE=$(PSLIB_SOURCE)26 libpslibsys_la_CPPFLAGS = $(SRCINC) $(PSLIB_CFLAGS) $(CFITSIO_CFLAGS) 11 27 libpslibsys_la_SOURCES = \ 12 28 psAbort.c \ … … 24 40 strcasestr.c 25 41 26 EXTRA_DIST = sys.i psErrorCodes.c.in psErrorCodes.h.in 42 EXTRA_DIST = sys.i psErrorCodes.c.in psErrorCodes.h.in psVersion.h 27 43 28 BUILT_SOURCES = psErrorCodes.c 44 BUILT_SOURCES = psErrorCodes.c psVersion.h 29 45 30 46 psErrorCodes.c: ../psErrorCodes_$(PS_LANG).dat psErrorCodes.c.in psErrorCodes.h -
trunk/psLib/src/sys/psConfigure.c
r23229 r23793 44 44 #include "psMemory.h" 45 45 46 #include "psVersionDefinitions.h" 47 46 48 static char *memCheckName = NULL; // Filename to which to write results of mem check 47 49 static FILE *memCheckFile = NULL; // File to which to write results of mem check … … 57 59 #endif 58 60 59 #define xstr(s) str(s)60 #define str(s) #s61 62 61 psString psLibVersion(void) 63 62 { 64 63 char *value = NULL; 65 psStringAppend(&value, "%s@%s", xstr(PSLIB_BRANCH), xstr(PSLIB_VERSION));64 psStringAppend(&value, "%s@%s", PSLIB_BRANCH, PSLIB_VERSION); 66 65 return value; 67 66 } … … 69 68 psString psLibSource(void) 70 69 { 71 return psStringCopy( xstr(PSLIB_SOURCE));70 return psStringCopy(PSLIB_SOURCE); 72 71 } 73 72
Note:
See TracChangeset
for help on using the changeset viewer.
