aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2009-04-30 19:16:31 +0100
committerRoy Marples <roy@marples.name>2009-04-30 19:16:31 +0100
commit21e45e895ce3ca586e0c5fd89a68b84c01d270de (patch)
treea4d7f09bd3e7284c7eac563818077a2eda0901f5 /src
parenta1e40e9beb621dbe342515ee0380c67837112a61 (diff)
Brand with git version instead of svn
Diffstat (limited to 'src')
-rw-r--r--src/rc/Makefile18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/rc/Makefile b/src/rc/Makefile
index ff2f1958..fbd72365 100644
--- a/src/rc/Makefile
+++ b/src/rc/Makefile
@@ -43,18 +43,18 @@ include ${MK}/${MKTERMCAP}.mk
LDADD+= ${LIBDL} ${LIBKVM}
include ${MK}/${MKPAM}.mk
-_SVNVER_SH= ret=""; \
- if type svnversion >/dev/null 2>&1; then \
- svnver="$$(LC_ALL=C svnversion)"; \
- [ "$${svnver}" != exported ] && ret="-svn-$${svnver}"; \
- fi; \
- echo "$${ret}";
-_SVNVER!= ${_SVNVER_SH}
-SVNVER= ${_SVNVER}$(shell ${_SVNVER_SH})
+_GITVER_SH= if git rev-parse --short HEAD >/dev/null 2>&1; then \
+ printf "."; \
+ git rev-parse --short HEAD; \
+ else; \
+ echo ""; \
+ fi
+_GITVER!= ${_GITVER_SH}
+GITVER= ${_GITVER}$(shell ${_GITVER_SH})
${SRCS}: version.h
version.h:
- sed -n -e 's/^VERSION=[[:space:]]*\([^[:space:]]*\).*/#define VERSION "\1${SVNVER}\"/p' ../../Makefile > version.h
+ sed -n -e 's/^VERSION=[[:space:]]*\([^[:space:]]*\).*/#define VERSION "\1${GITVER}\"/p' ../../Makefile > version.h
if test -n "${BRANDING}"; then \
echo "#define BRANDING \"${BRANDING}\"" >> version.h; \
fi