xref: /freebsd/bin/freebsd-version/Makefile (revision fc7284da06408923f7850a0e4e954a903b8ee038)
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