mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-06 17:18:32 +00:00
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
This commit is contained in:
parent
6efd223d8f
commit
0c55af22ae
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=283580
|
@ -30,6 +30,7 @@ EMBEDDED= 1
|
|||
.if ${BRANCH} == "STABLE" || ${BRANCH} == "CURRENT"
|
||||
SNAPSHOT= 1
|
||||
TLD?= ${FTPDIR}/snapshots
|
||||
. if !defined(SVNREVISION) || empty(SVNREVISION)
|
||||
. for _D in /usr/bin /usr/local/bin
|
||||
. for _S in svnversion svnliteversion
|
||||
. if exists(${_D}/${_S})
|
||||
|
@ -37,17 +38,18 @@ SVNVERSION?= ${_D}/${_S}
|
|||
. endif
|
||||
. endfor
|
||||
. endfor
|
||||
. 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
|
||||
BUILDDATE!= date +%Y%m%d
|
||||
. endif
|
||||
. if exists(${SVNVERSION}) && !empty(SVNVERSION)
|
||||
SVNREVISION!= ${SVNVERSION} ${WORLDDIR}/Makefile
|
||||
_SNAP_SUFFIX:= -r${SVNREVISION}-${BUILDDATE}
|
||||
. else
|
||||
_SNAP_SUFFIX:= -${BUILDDATE}
|
||||
. endif
|
||||
_SNAP_SUFFIX:= -r${SVNREVISION}-${BUILDDATE}
|
||||
.else
|
||||
# release
|
||||
SNAPSHOT=
|
||||
|
|
Loading…
Reference in a new issue