Just use the last line of the output from getting .OBJDIR. The

buildenv target prints other stuff too that needs to be ignored.

Sponsored by: Netflix
This commit is contained in:
Warner Losh 2017-12-04 16:38:20 +00:00
parent aabe1bb37a
commit 1f99cce2b0

View File

@ -26,7 +26,7 @@ dobuild()
local opt=$3
echo -n "Building $ta ${opt} ... "
objdir=$(make buildenv TARGET_ARCH=$ta BUILDENV_SHELL="make -V .OBJDIR")
objdir=$(make buildenv TARGET_ARCH=$ta BUILDENV_SHELL="make -V .OBJDIR" | tail -1)
rm -rf ${objdir}
if ! make buildenv TARGET_ARCH=$ta BUILDENV_SHELL="make clean cleandepend cleandir obj depend" \
> $lf 2>&1; then