Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 24 Oct 2013 22:55:15 +0000 (UTC)
From:      Glen Barber <gjb@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r257079 - head
Message-ID:  <201310242255.r9OMtFbB073550@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: gjb
Date: Thu Oct 24 22:55:15 2013
New Revision: 257079
URL: http://svnweb.freebsd.org/changeset/base/257079

Log:
  Fix build host pollution by avoiding calling 'uname -srp' to
  determine values for 'VERSION'.
  
  Looked at by:	cperciva

Modified:
  head/Makefile.inc1

Modified: head/Makefile.inc1
==============================================================================
--- head/Makefile.inc1	Thu Oct 24 22:21:31 2013	(r257078)
+++ head/Makefile.inc1	Thu Oct 24 22:55:15 2013	(r257079)
@@ -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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201310242255.r9OMtFbB073550>