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