From dfa099890c456aed9b7924373d4dc2f013856c04 Mon Sep 17 00:00:00 2001 From: Bryan Drewery Date: Wed, 1 Nov 2017 21:22:05 +0000 Subject: Add option UNIFIED_OBJDIR, on by default, which moves the default build OBJDIR. This changes the build OBJDIR from the older style of /usr/obj/ for native builds, and /usr/obj/./ for cross builds to a new simpler format of /usr/obj//.. This new format is used regardless of cross or native build. It allows easier management of multiple source tree object directories. The UNIFIED_OBJDIR option will be removed and its feature made permanent for the 12.0 release. Relnotes: yes (don't note UNIFIED_OBJDIR option since it will be removed) Prior work: D3711 D874 Reviewed by: gjb, sjg Discussed at: https://lists.freebsd.org/pipermail/freebsd-arch/2016-May/017805.html Discussed with: emaste Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D12840 --- release/tools/vmimage.subr | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'release/tools/vmimage.subr') diff --git a/release/tools/vmimage.subr b/release/tools/vmimage.subr index 6ba7e185a33f..78e7839d64e4 100644 --- a/release/tools/vmimage.subr +++ b/release/tools/vmimage.subr @@ -14,13 +14,10 @@ write_partition_layout() { SWAPOPT="-p freebsd-swap/swapfs::${SWAPSIZE}" fi - _OBJDIR="$(make -C ${WORLDDIR} -V .OBJDIR)" - _OBJDIR="$(realpath ${_OBJDIR})" - if [ -d "${_OBJDIR%%/usr/src}/${TARGET}.${TARGET_ARCH}" ]; then - BOOTFILES="/${_OBJDIR%%/usr/src}/${TARGET}.${TARGET_ARCH}/usr/src/sys/boot" - else - BOOTFILES="/${_OBJDIR}/sys/boot" - fi + BOOTFILES="$(env TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ + WITH_UNIFIED_OBJDIR=yes \ + make -C ${WORLDDIR}/sys/boot -V .OBJDIR)" + BOOTFILES="$(realpath ${BOOTFILES})" case "${TARGET}:${TARGET_ARCH}" in amd64:amd64 | i386:i386) -- cgit v1.2.3