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