XBPS_RELVER: embed the latest git rev hash.

This commit is contained in:
Juan RP 2012-11-20 00:38:23 +01:00
parent bdd93b7aa7
commit ddca33b4a9
2 changed files with 9 additions and 2 deletions

4
configure vendored
View File

@ -193,6 +193,10 @@ echo "CPPFLAGS = -I. -I\$(TOPDIR) -I\$(TOPDIR)/include" >>$CONFIG_MK
echo "CPPFLAGS += -DHAVE_CONFIG_H" >>$CONFIG_MK echo "CPPFLAGS += -DHAVE_CONFIG_H" >>$CONFIG_MK
echo "CPPFLAGS += -DXBPS_SYSCONF_PATH=\\\"${ETCDIR}\\\"" >>$CONFIG_MK echo "CPPFLAGS += -DXBPS_SYSCONF_PATH=\\\"${ETCDIR}\\\"" >>$CONFIG_MK
echo "CPPFLAGS += -DXBPS_VERSION=\\\"${VERSION}\\\"" >>$CONFIG_MK echo "CPPFLAGS += -DXBPS_VERSION=\\\"${VERSION}\\\"" >>$CONFIG_MK
if [ -d .git ]; then
_gitrev=$(git rev-parse master)
echo "CPPFLAGS += -DXBPS_GIT=\\\"${_gitrev}\\\"" >>$CONFIG_MK
fi
if [ -n "$DEBUG" -a "$DEBUG" != no -a "$DEBUG" != false ]; then if [ -n "$DEBUG" -a "$DEBUG" != no -a "$DEBUG" != false ]; then
echo "Building with debugging symbols." echo "Building with debugging symbols."

View File

@ -61,14 +61,17 @@
#ifndef XBPS_VERSION #ifndef XBPS_VERSION
#define XBPS_VERSION "UNSET" #define XBPS_VERSION "UNSET"
#endif #endif
#ifndef XBPS_GIT
#define XBPS_GIT "UNSET"
#endif
/** /**
* @def XBPS_RELVER * @def XBPS_RELVER
* Current library release date. * Current library release date.
*/ */
#define XBPS_RELVER "XBPS: " XBPS_VERSION \ #define XBPS_RELVER "XBPS: " XBPS_VERSION \
" API: " XBPS_API_VERSION \ " API: " XBPS_API_VERSION \
" INDEX: " XBPS_PKGINDEX_VERSION " INDEX: " XBPS_PKGINDEX_VERSION \
" GIT: " XBPS_GIT
/** /**
* @def XBPS_META_PATH * @def XBPS_META_PATH