svn commit: r326535 - head/tools/boot
Rodney W. Grimes
freebsd at pdx.rh.CN85.dnsmgr.net
Mon Dec 4 17:15:01 UTC 2017
[ Charset UTF-8 unsupported, converting... ]
> Author: imp
> Date: Mon Dec 4 16:38:20 2017
> New Revision: 326535
> URL: https://svnweb.freebsd.org/changeset/base/326535
>
> Log:
> 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
>
> Modified:
> head/tools/boot/universe.sh
>
> Modified: head/tools/boot/universe.sh
> ==============================================================================
> --- head/tools/boot/universe.sh Mon Dec 4 15:28:07 2017 (r326534)
> +++ head/tools/boot/universe.sh Mon Dec 4 16:38:20 2017 (r326535)
> @@ -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
We should probably find a better way than this,
that is a very error prone mechanism to use.
And given your gona run an rm -rf on the return value very dangerious
if wrong.
Something like adding a QUIET=true to buildenv so that it only outputs the
desired value? Or having buildenv have options to directly output your
desired .OBJDIR value?
--
Rod Grimes rgrimes at freebsd.org
More information about the svn-src-all
mailing list