Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 26 May 2015 20:51:44 +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: r283580 - head/release
Message-ID:  <201505262051.t4QKpiK3078143@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: gjb
Date: Tue May 26 20:51:44 2015
New Revision: 283580
URL: https://svnweb.freebsd.org/changeset/base/283580

Log:
  Use SVNREVISION and BUILDDATE if passed into the make(1)
  environment, fallback to trying to figure it out otherwise.
  
  MFC after:	3 days
  Sponsored by:	The FreeBSD Foundation

Modified:
  head/release/Makefile.mirrors

Modified: head/release/Makefile.mirrors
==============================================================================
--- head/release/Makefile.mirrors	Tue May 26 20:32:14 2015	(r283579)
+++ head/release/Makefile.mirrors	Tue May 26 20:51:44 2015	(r283580)
@@ -30,24 +30,26 @@ EMBEDDED=		1
 .if ${BRANCH} == "STABLE" || ${BRANCH} == "CURRENT"
 SNAPSHOT=		1
 TLD?=			${FTPDIR}/snapshots
-. for _D in /usr/bin /usr/local/bin
-.  for _S in svnversion svnliteversion
-.   if exists(${_D}/${_S})
+. if !defined(SVNREVISION) || empty(SVNREVISION)
+.  for _D in /usr/bin /usr/local/bin
+.   for _S in svnversion svnliteversion
+.    if exists(${_D}/${_S})
 SVNVERSION?=		${_D}/${_S}
-.   endif
+.    endif
+.   endfor
 .  endfor
-. endfor
-. if exists(${.CURDIR}/${.OBJDIR}/dist/base/bin/sh)
+.  if exists(${SVNVERSION}) && !empty(SVNVERSION)
+SVNREVISION!=		${SVNVERSION} ${WORLDDIR}/Makefile
+.  endif
+. endif # !defined(SVNERVISION)
+. if !defined(BUILDDATE) || empty(BUILDDATE)
+.  if exists(${.CURDIR}/${.OBJDIR}/dist/base/bin/sh)
 BUILDDATE!=		cd ${.CURDIR} && date -j -f '%s' $$(stat -f "%c" ${.OBJDIR}/dist/base/bin/sh) +%Y%m%d
-. else
+.  else
 BUILDDATE!=		date +%Y%m%d
+.  endif
 . endif
-. if exists(${SVNVERSION}) && !empty(SVNVERSION)
-SVNREVISION!=		${SVNVERSION} ${WORLDDIR}/Makefile
 _SNAP_SUFFIX:=		-r${SVNREVISION}-${BUILDDATE}
-. else
-_SNAP_SUFFIX:=		-${BUILDDATE}
-. endif
 .else
 # release
 SNAPSHOT=



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