xref: /freebsd/bin/freebsd-version/Makefile (revision a812392203d7c4c3f0db9d8a0f3391374c49c71f)
1# $FreeBSD$
2
3SCRIPTS = freebsd-version
4MAN = freebsd-version.1
5CLEANFILES = 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		" ${.ALLSRC} >${.TARGET} ; then \
15		rm -f ${.TARGET} ; \
16		exit 1 ; \
17	fi
18
19.include <bsd.prog.mk>
20