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