36c36
< # $FreeBSD: head/release/release.sh 262509 2014-02-26 01:06:41Z gjb $
---
> # $FreeBSD: head/release/release.sh 262810 2014-03-05 23:17:53Z gjb $
43a44
> RELENGDIR="$(realpath $(dirname $(basename ${0})))"
54a56,58
> # Set for embedded device builds.
> EMBEDDEDBUILD=
>
110a115,123
> if [ -n "${EMBEDDEDBUILD}" ]; then
> if [ -z "${XDEV}" ] || [ -z "${XDEV_ARCH}" ]; then
> echo "ERROR: XDEV and XDEV_ARCH must be set in ${RELEASECONF}."
> exit 1
> fi
> WITH_DVD=
> NODOC=yes
> fi
>
113c126
< if [ "x${NOPORTS}" != "x" ] && [ "x${NODOC}" = "x" ]; then
---
> if [ -n "${NOPORTS}" ] && [ -z "${NODOC}" ]; then
123c136
< if [ "x${NOPORTS}" != "x" ]; then
---
> if [ -n "${NOPORTS}" ]; then
126c139
< if [ "x${NODOC}" != "x" ]; then
---
> if [ -n "${NODOC}" ]; then
134c147
< if [ "x${TARGET}" != "x" ] && [ "x${TARGET_ARCH}" != "x" ]; then
---
> if [ -n "${TARGET}" ] && [ -n "${TARGET_ARCH}" ]; then
139c152
< CHROOT_MAKEENV="MAKEOBJDIRPREFIX=${CHROOTDIR}/tmp/obj"
---
> CHROOT_MAKEENV="${CHROOT_MAKEENV} MAKEOBJDIRPREFIX=${CHROOTDIR}/tmp/obj"
150c163
< if [ "x${SRC_FORCE_CHECKOUT}" != "x" ]; then
---
> if [ -n "${SRC_FORCE_CHECKOUT}" ]; then
154c167
< if [ ! ${CHROOTDIR} ]; then
---
> if [ -z "${CHROOTDIR}" ]; then
169c182
< if [ "x${NODOC}" = "x" ]; then
---
> if [ -z "${NODOC}" ]; then
172c185
< if [ "x${NOPORTS}" = "x" ]; then
---
> if [ -z "${NOPORTS}" ]; then
176,181c189,196
< cd ${CHROOTDIR}/usr/src
< env ${CHROOT_MAKEENV} make ${CHROOT_WMAKEFLAGS} buildworld
< env ${CHROOT_MAKEENV} make ${CHROOT_IMAKEFLAGS} installworld \
< DESTDIR=${CHROOTDIR}
< env ${CHROOT_MAKEENV} make ${CHROOT_DMAKEFLAGS} distribution \
< DESTDIR=${CHROOTDIR}
---
> if [ -z "${CHROOTBUILD_SKIP}" ]; then
> cd ${CHROOTDIR}/usr/src
> env ${CHROOT_MAKEENV} make ${CHROOT_WMAKEFLAGS} buildworld
> env ${CHROOT_MAKEENV} make ${CHROOT_IMAKEFLAGS} installworld \
> DESTDIR=${CHROOTDIR}
> env ${CHROOT_MAKEENV} make ${CHROOT_DMAKEFLAGS} distribution \
> DESTDIR=${CHROOTDIR}
> fi
196a212,234
> # Embedded builds do not use the 'make release' target.
> if [ -n "${EMBEDDEDBUILD}" ]; then
> # If a crochet configuration file exists in *this* checkout of
> # release/, copy it to the /tmp/external directory within the chroot.
> # This allows building embedded releases without relying on updated
> # scripts and/or configurations to exist in the branch being built.
> if [ -e ${RELENGDIR}/tools/${XDEV}/crochet-${KERNEL}.conf ] && \
> [ -e ${RELENGDIR}/${XDEV}/release.sh ]; then
> mkdir -p ${CHROOTDIR}/tmp/external/${XDEV}/
> cp ${RELENGDIR}/tools/${XDEV}/crochet-${KERNEL}.conf \
> ${CHROOTDIR}/tmp/external/${XDEV}/crochet-${KERNEL}.conf
> /bin/sh ${RELENGDIR}/${XDEV}/release.sh
> fi
> # If the script does not exist for this architecture, exit.
> # This probably should be checked earlier, but allowing the rest
> # of the build process to get this far will at least set up the
> # chroot environment for testing.
> exit 0
> else
> # Not embedded.
> continue
> fi
>
204c242
< if [ -d ${CHROOTDIR}/usr/doc ] && [ "x${NODOC}" = "x" ]; then
---
> if [ -d ${CHROOTDIR}/usr/doc ] && [ -z "${NODOC}" ]; then
212,215d249
< if [ "x${RELSTRING}" = "x" ]; then
< RELSTRING="$(chroot ${CHROOTDIR} uname -s)-${OSRELEASE}-${TARGET_ARCH}"
< fi
<
219c253
< release RELSTRING=${RELSTRING}
---
> release
221c255
< install DESTDIR=/R RELSTRING=${RELSTRING}
---
> install DESTDIR=/R
< # $FreeBSD: head/release/release.sh 262509 2014-02-26 01:06:41Z gjb $
---
> # $FreeBSD: head/release/release.sh 262810 2014-03-05 23:17:53Z gjb $
43a44
> RELENGDIR="$(realpath $(dirname $(basename ${0})))"
54a56,58
> # Set for embedded device builds.
> EMBEDDEDBUILD=
>
110a115,123
> if [ -n "${EMBEDDEDBUILD}" ]; then
> if [ -z "${XDEV}" ] || [ -z "${XDEV_ARCH}" ]; then
> echo "ERROR: XDEV and XDEV_ARCH must be set in ${RELEASECONF}."
> exit 1
> fi
> WITH_DVD=
> NODOC=yes
> fi
>
113c126
< if [ "x${NOPORTS}" != "x" ] && [ "x${NODOC}" = "x" ]; then
---
> if [ -n "${NOPORTS}" ] && [ -z "${NODOC}" ]; then
123c136
< if [ "x${NOPORTS}" != "x" ]; then
---
> if [ -n "${NOPORTS}" ]; then
126c139
< if [ "x${NODOC}" != "x" ]; then
---
> if [ -n "${NODOC}" ]; then
134c147
< if [ "x${TARGET}" != "x" ] && [ "x${TARGET_ARCH}" != "x" ]; then
---
> if [ -n "${TARGET}" ] && [ -n "${TARGET_ARCH}" ]; then
139c152
< CHROOT_MAKEENV="MAKEOBJDIRPREFIX=${CHROOTDIR}/tmp/obj"
---
> CHROOT_MAKEENV="${CHROOT_MAKEENV} MAKEOBJDIRPREFIX=${CHROOTDIR}/tmp/obj"
150c163
< if [ "x${SRC_FORCE_CHECKOUT}" != "x" ]; then
---
> if [ -n "${SRC_FORCE_CHECKOUT}" ]; then
154c167
< if [ ! ${CHROOTDIR} ]; then
---
> if [ -z "${CHROOTDIR}" ]; then
169c182
< if [ "x${NODOC}" = "x" ]; then
---
> if [ -z "${NODOC}" ]; then
172c185
< if [ "x${NOPORTS}" = "x" ]; then
---
> if [ -z "${NOPORTS}" ]; then
176,181c189,196
< cd ${CHROOTDIR}/usr/src
< env ${CHROOT_MAKEENV} make ${CHROOT_WMAKEFLAGS} buildworld
< env ${CHROOT_MAKEENV} make ${CHROOT_IMAKEFLAGS} installworld \
< DESTDIR=${CHROOTDIR}
< env ${CHROOT_MAKEENV} make ${CHROOT_DMAKEFLAGS} distribution \
< DESTDIR=${CHROOTDIR}
---
> if [ -z "${CHROOTBUILD_SKIP}" ]; then
> cd ${CHROOTDIR}/usr/src
> env ${CHROOT_MAKEENV} make ${CHROOT_WMAKEFLAGS} buildworld
> env ${CHROOT_MAKEENV} make ${CHROOT_IMAKEFLAGS} installworld \
> DESTDIR=${CHROOTDIR}
> env ${CHROOT_MAKEENV} make ${CHROOT_DMAKEFLAGS} distribution \
> DESTDIR=${CHROOTDIR}
> fi
196a212,234
> # Embedded builds do not use the 'make release' target.
> if [ -n "${EMBEDDEDBUILD}" ]; then
> # If a crochet configuration file exists in *this* checkout of
> # release/, copy it to the /tmp/external directory within the chroot.
> # This allows building embedded releases without relying on updated
> # scripts and/or configurations to exist in the branch being built.
> if [ -e ${RELENGDIR}/tools/${XDEV}/crochet-${KERNEL}.conf ] && \
> [ -e ${RELENGDIR}/${XDEV}/release.sh ]; then
> mkdir -p ${CHROOTDIR}/tmp/external/${XDEV}/
> cp ${RELENGDIR}/tools/${XDEV}/crochet-${KERNEL}.conf \
> ${CHROOTDIR}/tmp/external/${XDEV}/crochet-${KERNEL}.conf
> /bin/sh ${RELENGDIR}/${XDEV}/release.sh
> fi
> # If the script does not exist for this architecture, exit.
> # This probably should be checked earlier, but allowing the rest
> # of the build process to get this far will at least set up the
> # chroot environment for testing.
> exit 0
> else
> # Not embedded.
> continue
> fi
>
204c242
< if [ -d ${CHROOTDIR}/usr/doc ] && [ "x${NODOC}" = "x" ]; then
---
> if [ -d ${CHROOTDIR}/usr/doc ] && [ -z "${NODOC}" ]; then
212,215d249
< if [ "x${RELSTRING}" = "x" ]; then
< RELSTRING="$(chroot ${CHROOTDIR} uname -s)-${OSRELEASE}-${TARGET_ARCH}"
< fi
<
219c253
< release RELSTRING=${RELSTRING}
---
> release
221c255
< install DESTDIR=/R RELSTRING=${RELSTRING}
---
> install DESTDIR=/R