When we have an invalid build option, don't rm -rf the current
directory. Add a quick sanity check to objdir before using it. It must start with /. If there was a make error getting it, report that and continue with the next target. If there was anything else, bail out.
This commit is contained in:
parent
a10ed08fe0
commit
22ea5a7250
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=360538
@ -19,6 +19,12 @@
|
|||||||
# Output is put into _.boot.$TARGET_ARCH.log in sys.boot.
|
# Output is put into _.boot.$TARGET_ARCH.log in sys.boot.
|
||||||
#
|
#
|
||||||
|
|
||||||
|
die()
|
||||||
|
{
|
||||||
|
echo $*
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
dobuild()
|
dobuild()
|
||||||
{
|
{
|
||||||
local ta=$1
|
local ta=$1
|
||||||
@ -27,6 +33,12 @@ dobuild()
|
|||||||
|
|
||||||
echo -n "Building $ta ${opt} ... "
|
echo -n "Building $ta ${opt} ... "
|
||||||
objdir=$(make buildenv TARGET_ARCH=$ta BUILDENV_SHELL="make -V .OBJDIR" | tail -1)
|
objdir=$(make buildenv TARGET_ARCH=$ta BUILDENV_SHELL="make -V .OBJDIR" | tail -1)
|
||||||
|
case ${objdir} in
|
||||||
|
/*) ;;
|
||||||
|
make*) echo Error message from make: $objdir
|
||||||
|
continue ;;
|
||||||
|
*) die Crazy object dir: $objdir ;;
|
||||||
|
esac
|
||||||
rm -rf ${objdir}
|
rm -rf ${objdir}
|
||||||
if ! make buildenv TARGET_ARCH=$ta BUILDENV_SHELL="make clean cleandepend cleandir obj depend" \
|
if ! make buildenv TARGET_ARCH=$ta BUILDENV_SHELL="make clean cleandepend cleandir obj depend" \
|
||||||
> $lf 2>&1; then
|
> $lf 2>&1; then
|
||||||
@ -116,4 +128,3 @@ for i in \
|
|||||||
ta=${i##*/}
|
ta=${i##*/}
|
||||||
dobuild $ta _.boot.${ta}.debug.log "LOADER_DEBUG=yes"
|
dobuild $ta _.boot.${ta}.debug.log "LOADER_DEBUG=yes"
|
||||||
done
|
done
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user