xref: /freebsd/bin/freebsd-version/Makefile (revision 41059135ce931c0f1014a999ffabc6bc470ce856)
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 $$(egrep '^(TYPE|REVISION|BRANCH)=' ${NEWVERS}) ; \
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