Use some slightly less horrible make magic for doing the version stuff.

This commit is contained in:
peter 2001-08-10 11:24:23 +00:00
parent e0b94042d7
commit f9feb25a75
2 changed files with 12 additions and 17 deletions

View File

@ -40,16 +40,12 @@ DISTRIBUTION= krb4
CFLAGS+= -DENCRYPTION
.endif
CLEANFILES+= version.c ver
CLEANFILES+= version.c
VERSION!= sed < ${CVSDIR}/configure \
-e '/^VERSION=/!d' -e 's/.*=\(.*\)/\1/' -e q
ver: configure
echo > ${.TARGET} `sed < ${.ALLSRC} \
-e '/^VERSION=/!d' \
-e 's/.*=\(.*\)/\1/' \
-e q`
version.c: ver version.c.in
sed -e "s,@VERSION@,`cat ver`,g" ${CVSDIR}/src/version.c.in > ${.TARGET}
version.c: version.c.in
sed -e "s,@VERSION@,${VERSION}-FreeBSD,g" ${.ALLSRC} > ${.TARGET}
#
# Regression test support

View File

@ -11,15 +11,14 @@ MAINTAINER= peter@FreeBSD.org
SCRIPTS= cvsbug
MAN= cvsbug.8
CLEANFILES+= cvsbug ver
CLEANFILES+= version.c
VERSION!= sed < ${CVSDIR}/configure \
-e '/^VERSION=/!d' -e 's/.*=\(.*\)/\1/' -e q
ver: configure
echo > ${.TARGET} `sed < ${.ALLSRC} \
-e '/^VERSION=/!d' \
-e 's/.*=\(.*\)/\1/' \
-e q`
version.c: version.c.in
sed -e "s,@VERSION@,${VERSION}-FreeBSD,g" ${.ALLSRC} > ${.TARGET}
cvsbug: ver cvsbug.in
sed -e "s,@VERSION@,`cat ver`,g" ${CVSDIR}/src/cvsbug.in > ${.TARGET}
cvsbug: cvsbug.in
sed -e "s,@VERSION@,${VERSION}-FreeBSD,g" ${.ALLSRC} > ${.TARGET}
.include <bsd.prog.mk>