Brand with git version instead of svn
This commit is contained in:
parent
a1e40e9beb
commit
21e45e895c
@ -43,18 +43,18 @@ include ${MK}/${MKTERMCAP}.mk
|
|||||||
LDADD+= ${LIBDL} ${LIBKVM}
|
LDADD+= ${LIBDL} ${LIBKVM}
|
||||||
include ${MK}/${MKPAM}.mk
|
include ${MK}/${MKPAM}.mk
|
||||||
|
|
||||||
_SVNVER_SH= ret=""; \
|
_GITVER_SH= if git rev-parse --short HEAD >/dev/null 2>&1; then \
|
||||||
if type svnversion >/dev/null 2>&1; then \
|
printf "."; \
|
||||||
svnver="$$(LC_ALL=C svnversion)"; \
|
git rev-parse --short HEAD; \
|
||||||
[ "$${svnver}" != exported ] && ret="-svn-$${svnver}"; \
|
else; \
|
||||||
fi; \
|
echo ""; \
|
||||||
echo "$${ret}";
|
fi
|
||||||
_SVNVER!= ${_SVNVER_SH}
|
_GITVER!= ${_GITVER_SH}
|
||||||
SVNVER= ${_SVNVER}$(shell ${_SVNVER_SH})
|
GITVER= ${_GITVER}$(shell ${_GITVER_SH})
|
||||||
|
|
||||||
${SRCS}: version.h
|
${SRCS}: version.h
|
||||||
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 \
|
if test -n "${BRANDING}"; then \
|
||||||
echo "#define BRANDING \"${BRANDING}\"" >> version.h; \
|
echo "#define BRANDING \"${BRANDING}\"" >> version.h; \
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user