From 21e45e895ce3ca586e0c5fd89a68b84c01d270de Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Thu, 30 Apr 2009 19:16:31 +0100 Subject: Brand with git version instead of svn --- src/rc/Makefile | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src/rc/Makefile') 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 -- cgit v1.2.3