mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-11-22 03:04:34 +01:00
etcupdate: Use new buildetc and installetc targets when available
These new targets avoid the need to invoke internal build system targets or set internal variables when building, and also have the added benefit of working with BUILD_WITH_STRICT_TMPPATH. Old source trees lacking such targets will not work with BUILD_WITH_STRICT_TMPPATH; they could be made to work by copying the steps, but it's not worth doing so, as they never have worked in the past. The primary goal of this is to support changing the default of BUILD_WITH_STRICT_TMPPATH to enabled. Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D41206
This commit is contained in:
parent
d81da4c983
commit
246364454f
@ -219,11 +219,19 @@ build_tree()
|
||||
cd $SRCDIR || exit 1;
|
||||
if ! [ -n "$nobuild" ]; then
|
||||
export MAKEOBJDIRPREFIX=$destdir/usr/obj;
|
||||
if [ -n "$($make -V.ALLTARGETS:Mbuildetc)" ]; then
|
||||
$make buildetc || exit 1
|
||||
else
|
||||
$make _obj SUBDIR_OVERRIDE=etc || exit 1
|
||||
$make everything SUBDIR_OVERRIDE=etc || exit 1
|
||||
fi
|
||||
fi
|
||||
if [ -n "$($make -V.ALLTARGETS:Minstalletc)" ]; then
|
||||
$make DESTDIR=$destdir installetc || exit 1
|
||||
else
|
||||
$make DESTDIR=$destdir distrib-dirs || exit 1
|
||||
$make DESTDIR=$destdir distribution || exit 1
|
||||
fi
|
||||
) || return 1
|
||||
fi
|
||||
chflags -R noschg $1 || return 1
|
||||
|
Loading…
Reference in New Issue
Block a user