Changeset 23794 for trunk/psModules/src/config
- Timestamp:
- Apr 9, 2009, 10:17:52 PM (17 years ago)
- Location:
- trunk/psModules/src/config
- Files:
-
- 1 added
- 3 edited
-
. (modified) (1 prop)
-
Makefile.am (modified) (2 diffs)
-
pmVersion.c (modified) (3 diffs)
-
pmVersionDefinitions.h.in (added)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/config
- Property svn:ignore
-
old new 7 7 pmErrorCodes.c 8 8 pmErrorCodes.h 9 pmVersionDefinitions.h
-
- Property svn:ignore
-
trunk/psModules/src/config/Makefile.am
r23788 r23794 1 1 noinst_LTLIBRARIES = libpsmodulesconfig.la 2 2 3 if HAVE_SVNVERSION 4 PSMODULES_VERSION=`$(SVNVERSION) ../..` 5 else 6 PSMODULES_VERSION="UNKNOWN" 7 endif 8 9 if HAVE_SVN 10 PSMODULES_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 PSMODULES_SOURCE=`$(SVN) info | $(SED) -n -e 's/Repository UUID: // p'` 12 else 13 PSMODULES_BRANCH="UNKNOWN" 14 PSMODULES_SOURCE="UNKNOWN" 15 endif 16 3 17 # Force recompilation of pmVersion.c, since it gets the version information 4 pmVersion.c: FORCE 5 touch pmVersion.c 18 pmVersion.c: pmVersionDefinitions.h 19 pmVersionDefinitions.h: pmVersionDefinitions.h.in FORCE 20 -$(RM) pmVersionDefinitions.h 21 $(SED) -e "s|@PSMODULES_VERSION@|\"$(PSMODULES_VERSION)\"|" -e "s|@PSMODULES_BRANCH@|\"$(PSMODULES_BRANCH)\"|" -e "s|@PSMODULES_SOURCE@|\"$(PSMODULES_SOURCE)\"|" pmVersionDefinitions.h.in > pmVersionDefinitions.h 6 22 FORCE: ; 7 23 8 libpsmodulesconfig_la_CPPFLAGS = $(SRCINC) $(PSMODULES_CFLAGS) -DPSMODULES_VERSION=$(PSMODULES_VERSION) -DPSMODULES_BRANCH=$(PSMODULES_BRANCH) -DPSMODULES_SOURCE=$(PSMODULES_SOURCE)24 libpsmodulesconfig_la_CPPFLAGS = $(SRCINC) $(PSMODULES_CFLAGS) 9 25 libpsmodulesconfig_la_LDFLAGS = -release $(PACKAGE_VERSION) 10 26 libpsmodulesconfig_la_SOURCES = \ … … 31 47 32 48 # Error codes. 33 BUILT_SOURCES = pmErrorCodes.h pmErrorCodes.c 34 CLEANFILES = *~ pmErrorCodes.h pmErrorCodes.c 49 BUILT_SOURCES = pmErrorCodes.h pmErrorCodes.c pmVersionDefinitions.h 50 CLEANFILES = *~ pmErrorCodes.h pmErrorCodes.c pmVersionDefinitions.h 35 51 36 52 pmErrorCodes.h : pmErrorCodes.dat pmErrorCodes.h.in -
trunk/psModules/src/config/pmVersion.c
r23289 r23794 7 7 #include <pslib.h> 8 8 #include "pmVersion.h" 9 #include "pmVersionDefinitions.h" 9 10 10 11 #ifndef PSMODULES_VERSION … … 18 19 #endif 19 20 20 #define xstr(s) str(s)21 #define str(s) #s22 23 21 psString psModulesVersion(void) 24 22 { 25 23 char *value = NULL; 26 psStringAppend(&value, "%s@%s", xstr(PSMODULES_BRANCH), xstr(PSMODULES_VERSION));24 psStringAppend(&value, "%s@%s", PSMODULES_BRANCH, PSMODULES_VERSION); 27 25 return value; 28 26 } … … 30 28 psString psModulesSource(void) 31 29 { 32 return psStringCopy( xstr(PSMODULES_SOURCE));30 return psStringCopy(PSMODULES_SOURCE); 33 31 } 34 32
Note:
See TracChangeset
for help on using the changeset viewer.
