Fix build host pollution by avoiding calling 'uname -srp' to

determine values for 'VERSION'.

Looked at by:	cperciva
This commit is contained in:
Glen Barber 2013-10-24 22:55:15 +00:00
parent 4083db7d5d
commit 57bd24ceaa

View File

@ -58,6 +58,7 @@
# use that new version. And the new (dynamically-linked) /bin/sh # use that new version. And the new (dynamically-linked) /bin/sh
# will expect to find appropriate libraries in /lib and /libexec. # will expect to find appropriate libraries in /lib and /libexec.
# #
SRCDIR?= ${.CURDIR}
.if defined(SUBDIR_OVERRIDE) .if defined(SUBDIR_OVERRIDE)
SUBDIR= ${SUBDIR_OVERRIDE} SUBDIR= ${SUBDIR_OVERRIDE}
.else .else
@ -128,8 +129,11 @@ OSRELDATE= 0
.endif .endif
.if !defined(VERSION) .if !defined(VERSION)
VERSION!= uname -srp REVISION!= make -C ${SRCDIR}/release -V REVISION
VERSION+= ${OSRELDATE} BRANCH!= make -C ${SRCDIR}/release -V BRANCH
SRCRELDATE!= awk '/^\#define[[:space:]]*__FreeBSD_version/ { print $$3 }' \
${SRCDIR}/sys/sys/param.h
VERSION= FreeBSD ${REVISION}-${BRANCH} ${TARGET_ARCH} ${SRCRELDATE}
.endif .endif
KNOWN_ARCHES?= amd64 arm armeb/arm armv6/arm i386 i386/pc98 ia64 mips mipsel/mips mips64el/mips mips64/mips mipsn32el/mips mipsn32/mips powerpc powerpc64/powerpc sparc64 KNOWN_ARCHES?= amd64 arm armeb/arm armv6/arm i386 i386/pc98 ia64 mips mipsel/mips mips64el/mips mips64/mips mipsn32el/mips mipsn32/mips powerpc powerpc64/powerpc sparc64