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