Fix unset variables from r298417.

Pointyhat to:	bdrewery
Sponsored by:	EMC / Isilon Storage Division
This commit is contained in:
Bryan Drewery 2016-04-21 16:50:45 +00:00
parent 473bbf691b
commit 75a6cb4f34

View File

@ -185,24 +185,33 @@ OSRELDATE= 0
.endif .endif
# Set VERSION for CTFMERGE to use via the default CTFFLAGS=-L VERSION. # Set VERSION for CTFMERGE to use via the default CTFFLAGS=-L VERSION.
.if !defined(VERSION) .if !defined(_REVISION)
REVISION!= MK_AUTO_OBJ=no ${MAKE} -C ${SRCDIR}/release -V REVISION _REVISION!= MK_AUTO_OBJ=no ${MAKE} -C ${SRCDIR}/release -V REVISION
BRANCH!= MK_AUTO_OBJ=no ${MAKE} -C ${SRCDIR}/release -V BRANCH .export _REVISION
.endif
.if !defined(_BRANCH)
_BRANCH!= MK_AUTO_OBJ=no ${MAKE} -C ${SRCDIR}/release -V BRANCH
.export _BRANCH
.endif
.if !defined(SRCRELDATE)
SRCRELDATE!= awk '/^\#define[[:space:]]*__FreeBSD_version/ { print $$3 }' \ SRCRELDATE!= awk '/^\#define[[:space:]]*__FreeBSD_version/ { print $$3 }' \
${SRCDIR}/sys/sys/param.h ${SRCDIR}/sys/sys/param.h
VERSION= FreeBSD ${REVISION}-${BRANCH:C/-p[0-9]+$//} ${TARGET_ARCH} ${SRCRELDATE} .export SRCRELDATE
.endif
.if !defined(VERSION)
VERSION= FreeBSD ${_REVISION}-${_BRANCH:C/-p[0-9]+$//} ${TARGET_ARCH} ${SRCRELDATE}
.export VERSION .export VERSION
.endif .endif
.if !defined(PKG_VERSION) .if !defined(PKG_VERSION)
.if ${BRANCH:MSTABLE*} || ${BRANCH:MCURRENT*} .if ${_BRANCH:MSTABLE*} || ${_BRANCH:MCURRENT*}
TIMENOW= %Y%m%d%H%M%S TIMENOW= %Y%m%d%H%M%S
EXTRA_REVISION= .s${TIMENOW:gmtime} EXTRA_REVISION= .s${TIMENOW:gmtime}
.endif .endif
.if ${BRANCH:M*-p*} .if ${_BRANCH:M*-p*}
EXTRA_REVISION= _${BRANCH:C/.*-p([0-9]+$)/\1/} EXTRA_REVISION= _${_BRANCH:C/.*-p([0-9]+$)/\1/}
.endif .endif
PKG_VERSION= ${REVISION}${EXTRA_REVISION} PKG_VERSION= ${_REVISION}${EXTRA_REVISION}
.endif .endif
KNOWN_ARCHES?= aarch64/arm64 \ KNOWN_ARCHES?= aarch64/arm64 \
@ -1257,7 +1266,7 @@ packages: .PHONY
package-pkg: .PHONY package-pkg: .PHONY
rm -rf /tmp/ports.${TARGET} || : rm -rf /tmp/ports.${TARGET} || :
env ${WMAKEENV:Q} SRCDIR=${.CURDIR} PORTSDIR=${PORTSDIR} REVISION=${REVISION} \ env ${WMAKEENV:Q} SRCDIR=${.CURDIR} PORTSDIR=${PORTSDIR} REVISION=${_REVISION} \
PKG_VERSION=${PKG_VERSION} REPODIR=${REPODIR} WSTAGEDIR=${WSTAGEDIR} \ PKG_VERSION=${PKG_VERSION} REPODIR=${REPODIR} WSTAGEDIR=${WSTAGEDIR} \
sh ${.CURDIR}/release/scripts/make-pkg-package.sh sh ${.CURDIR}/release/scripts/make-pkg-package.sh