aboutsummaryrefslogtreecommitdiff
path: root/gnu/usr.bin
diff options
context:
space:
mode:
authorPeter Wemm <peter@FreeBSD.org>2001-08-10 10:29:04 +0000
committerPeter Wemm <peter@FreeBSD.org>2001-08-10 10:29:04 +0000
commitdded7a88d2804618e612194a65bb812ac0350c38 (patch)
tree807581549bef718e6b95705c3f3c9d5fcfd26b69 /gnu/usr.bin
parentd51af2baf34d153fb18576374ef242ea8c3d4ed2 (diff)
downloadsrc-dded7a88d2804618e612194a65bb812ac0350c38.tar.gz
src-dded7a88d2804618e612194a65bb812ac0350c38.zip
Generate version.c on the fly rather than using a generated file.
Notes
Notes: svn path=/head/; revision=81422
Diffstat (limited to 'gnu/usr.bin')
-rw-r--r--gnu/usr.bin/cvs/cvs/Makefile12
1 files changed, 12 insertions, 0 deletions
diff --git a/gnu/usr.bin/cvs/cvs/Makefile b/gnu/usr.bin/cvs/cvs/Makefile
index 06015ae2254c..1d6297463244 100644
--- a/gnu/usr.bin/cvs/cvs/Makefile
+++ b/gnu/usr.bin/cvs/cvs/Makefile
@@ -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
#