Generate version.c on the fly rather than using a generated file.

This commit is contained in:
peter 2001-08-10 10:29:04 +00:00
parent 62213329f1
commit ca66fa4a19

View File

@ -7,6 +7,7 @@ MAINTAINER= peter@FreeBSD.org
.PATH: ${CVSDIR}/src
.PATH: ${CVSDIR}/lib
.PATH: ${CVSDIR}/man
.PATH: ${CVSDIR}
PROG= cvs
MAN= cvs.1 cvs.5
@ -39,6 +40,17 @@ DISTRIBUTION= krb4
CFLAGS+= -DENCRYPTION
.endif
CLEANFILES+= version.c ver
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}
#
# Regression test support
#