build: fix xtools on 12.1

While here allow SRCREVISION to be read everywhere.  The prefetch
script appreciates the additional info so it doesn't have to guess
anymore.  :)
This commit is contained in:
Franco Fichtner 2019-10-30 14:22:14 +01:00
parent 80e28f5e8d
commit a60abeddae
3 changed files with 9 additions and 2 deletions

View File

@ -260,6 +260,8 @@ export PRODUCT_CORE="${PRODUCT_TYPE}${PRODUCT_SUFFIX}"
export PRODUCT_PLUGINS="os-*"
export PRODUCT_PLUGIN="os-*${PRODUCT_SUFFIX}"
# get the current version for the selected source repository
eval export SRC$(grep ^REVISION= ${SRCDIR}/sys/conf/newvers.sh)
case "${SELF}" in
confirm|fingerprint|info|print)

View File

@ -31,8 +31,7 @@ SELF=prefetch
. ./common.sh
# XXX does not adapt to FreeBSD version used
ABI="FreeBSD:11:${PRODUCT_ARCH}/${PRODUCT_SETTINGS}"
ABI="FreeBSD:${SRCREVISION%%.*}:${PRODUCT_ARCH}/${PRODUCT_SETTINGS}"
for ARG in ${@}; do
case ${ARG} in

View File

@ -59,6 +59,12 @@ ${ENV_FILTER} make -C${SRCDIR} -j${CPUS} native-xtools ${MAKE_ARGS} NO_CLEAN=yes
XTOOLS_DIR=$(make -C${SRCDIR} -f Makefile.inc1 -V OBJTREE ${MAKE_ARGS})/nxb-bin
if [ "${SRCREVISION}" = "12.1" ]; then
# XXX as long as we support 11.2 we need this as a conditional and
# maybe later we want to directly install into a stage dir...
${ENV_FILTER} make -C${SRCDIR} -j${CPUS} native-xtools-install ${MAKE_ARGS} NO_CLEAN=yes DESTDIR=${XTOOLS_DIR}/..
fi
echo -n ">>> Generating xtools set... "
tar -C ${XTOOLS_DIR} -cJf ${XTOOLS_SET} .