diff options
author | gjb <gjb@FreeBSD.org> | 2013-10-25 21:27:35 +0000 |
---|---|---|
committer | gjb <gjb@FreeBSD.org> | 2013-10-25 21:27:35 +0000 |
commit | 2074bdb75aab5540641b53896abca77607ab6ce9 (patch) | |
tree | 38694d221553d1cc24e875918585cded9c3db254 | |
parent | c26ecf05552e3861de3293801d85fe44f236b115 (diff) | |
download | FreeBSD-src-2074bdb75aab5540641b53896abca77607ab6ce9.zip FreeBSD-src-2074bdb75aab5540641b53896abca77607ab6ce9.tar.gz |
MFC r257079:
Fix build host pollution by avoiding calling 'uname -srp' to
determine values for 'VERSION'.
Approved by: re (glebius)
-rw-r--r-- | Makefile.inc1 | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Makefile.inc1 b/Makefile.inc1 index 22dc111..413fe63 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -58,6 +58,7 @@ # use that new version. And the new (dynamically-linked) /bin/sh # will expect to find appropriate libraries in /lib and /libexec. # +SRCDIR?= ${.CURDIR} .if defined(SUBDIR_OVERRIDE) SUBDIR= ${SUBDIR_OVERRIDE} .else @@ -128,8 +129,11 @@ OSRELDATE= 0 .endif .if !defined(VERSION) -VERSION!= uname -srp -VERSION+= ${OSRELDATE} +REVISION!= make -C ${SRCDIR}/release -V REVISION +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 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 |