summaryrefslogtreecommitdiff
path: root/Makefile.inc1
diff options
context:
space:
mode:
authorGlen Barber <gjb@FreeBSD.org>2013-10-24 22:55:15 +0000
committerGlen Barber <gjb@FreeBSD.org>2013-10-24 22:55:15 +0000
commit57bd24ceaaa7a900c129ed37290e2a29d6b150c9 (patch)
treeba817adaffb00688f6a3783e1360e1ecfe0606c2 /Makefile.inc1
parent4083db7d5d4dcb12e034e81e311ee0148b0cb27a (diff)
downloadsrc-test2-57bd24ceaaa7a900c129ed37290e2a29d6b150c9.tar.gz
src-test2-57bd24ceaaa7a900c129ed37290e2a29d6b150c9.zip
Fix build host pollution by avoiding calling 'uname -srp' to
determine values for 'VERSION'. Looked at by: cperciva
Notes
Notes: svn path=/head/; revision=257079
Diffstat (limited to 'Makefile.inc1')
-rw-r--r--Makefile.inc18
1 files changed, 6 insertions, 2 deletions
diff --git a/Makefile.inc1 b/Makefile.inc1
index b205f541f3c6..728ea844525e 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