xref: /freebsd/bin/freebsd-version/Makefile (revision 1f4bcc459a76b7aa664f3fd557684cd0ba6da352)
1# $FreeBSD$
2
3SCRIPTS = freebsd-version
4MAN = freebsd-version.1
5CLEANFILES = freebsd-version freebsd-version.sh
6NEWVERS = ${.CURDIR}/../../sys/conf/newvers.sh
7
8freebsd-version.sh: ${.CURDIR}/freebsd-version.sh.in ${NEWVERS}
9	eval $$(egrep '^(TYPE|REVISION|BRANCH)=' ${NEWVERS}) ; \
10	if ! sed -e "\
11			s/@@TYPE@@/$${TYPE}/g; \
12			s/@@REVISION@@/$${REVISION}/g; \
13			s/@@BRANCH@@/$${BRANCH}/g; \
14		" ${.CURDIR}/freebsd-version.sh.in >${.TARGET} ; then \
15		rm -f ${.TARGET} ; \
16		exit 1 ; \
17	fi
18
19.include <bsd.prog.mk>
20