diff options
author | Roy Marples <roy@marples.name> | 2008-12-04 13:12:46 +0000 |
---|---|---|
committer | Roy Marples <roy@marples.name> | 2008-12-04 13:12:46 +0000 |
commit | f8210050e52ba2f48db881bb56ddaa873ceca395 (patch) | |
tree | 4a2cffdbce6b7da60b7e5d8acf91294bb10617d8 /src/rc | |
parent | 38e6c9ba5c584dfbf20f98eace464595405e1c88 (diff) |
If we're building from subversion, brand the binary as such.
Diffstat (limited to 'src/rc')
-rw-r--r-- | src/rc/Makefile | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/rc/Makefile b/src/rc/Makefile index a45145f0..f7f5ff55 100644 --- a/src/rc/Makefile +++ b/src/rc/Makefile @@ -43,9 +43,17 @@ include ${MK}/${MKTERMCAP}.mk LDADD+= ${LIBDL} ${LIBKVM} include ${MK}/${MKPAM}.mk +_SVNVER_SH= if type svnversion >/dev/null 2>&1; then \ + echo "-svn-$$(svnversion)"; \ + else \ + echo ""; \ + fi +_SVNVER!= ${_SVNVER_SH} +SVNVER= ${_SVNVER}$(shell ${_SVNVER_SH}) + ${SRCS}: version.h version.h: - sed -n -e 's/^VERSION=[[:space:]]*\([^[:space:]]*\).*/#define VERSION "\1\"/p' ../../Makefile > version.h + sed -n -e 's/^VERSION=[[:space:]]*\([^[:space:]]*\).*/#define VERSION "\1${SVNVER}\"/p' ../../Makefile > version.h if test -n "${BRANDING}"; then \ echo "#define BRANDING \"${BRANDING}\"" >> version.h; \ fi |