Makefile.inc1: Add new buildetc and installetc targets

These implement the steps that etcupdate (and mergemaster) need in order
to build their pristine trees, avoiding the need to use internal targets
and variables. Additionally, buildetc includes the steps needed to build
with BUILD_WITH_STRICT_TMPPATH enabled, since we need some host tools to
be available during the various build and install steps.

Reviewed by:	jhb, imp
Differential Revision:	https://reviews.freebsd.org/D41205
This commit is contained in:
Jessica Clarke
2023-07-27 05:10:49 +01:00
parent 03e62670c3
commit d81da4c983
2 changed files with 25 additions and 2 deletions
+23
View File
@@ -1623,6 +1623,29 @@ distrib-dirs distribution: .MAKE .PHONY
MK_TESTS_SUPPORT=${MK_TESTS_SUPPORT} installconfig
.endif
#
# buildetc and installetc
#
buildetc: .MAKE .PHONY
${_+_}cd ${.CURDIR}; ${MAKE} -f Makefile.inc1 _worldtmp
${_+_}cd ${.CURDIR}; ${MAKE} -f Makefile.inc1 _legacy
${_+_}cd ${.CURDIR}; ${MAKE} -f Makefile.inc1 _bootstrap-tools \
MK_CROSS_COMPILER=no MK_TOOLCHAIN=no
${_+_}cd ${.CURDIR}; ${MAKE} -f Makefile.inc1 _obj \
SUBDIR_OVERRIDE=etc
${_+_}cd ${.CURDIR}; ${MAKE} -f Makefile.inc1 everything \
SUBDIR_OVERRIDE=etc
installetc: .MAKE .PHONY
@echo "--------------------------------------------------------------"
@echo ">>> Making hierarchy"
@echo "--------------------------------------------------------------"
${_+_}cd ${.CURDIR}; ${MAKE} -f Makefile.inc1 distrib-dirs
@echo "--------------------------------------------------------------"
@echo ">>> Making distribution"
@echo "--------------------------------------------------------------"
${_+_}cd ${.CURDIR}; ${MAKE} -f Makefile.inc1 distribution
#
# buildkernel and installkernel
#