Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 27 Jul 2023 04:12:05 GMT
From:      Jessica Clarke <jrtc27@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: d81da4c98328 - main - Makefile.inc1: Add new buildetc and installetc targets
Message-ID:  <202307270412.36R4C5S4097722@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by jrtc27:

URL: https://cgit.FreeBSD.org/src/commit/?id=d81da4c98328d4ee3fe4c0a85f6874a3c69a1afd

commit d81da4c98328d4ee3fe4c0a85f6874a3c69a1afd
Author:     Jessica Clarke <jrtc27@FreeBSD.org>
AuthorDate: 2023-07-27 04:10:49 +0000
Commit:     Jessica Clarke <jrtc27@FreeBSD.org>
CommitDate: 2023-07-27 04:10:49 +0000

    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
---
 Makefile      |  4 ++--
 Makefile.inc1 | 23 +++++++++++++++++++++++
 2 files changed, 25 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index f3bc3d1f96aa..699f003bf7df 100644
--- a/Makefile
+++ b/Makefile
@@ -158,14 +158,14 @@ __DO_KERNELS?=yes
 
 .include "${.CURDIR}/share/mk/bsd.compat.pre.mk"
 
-TGTS=	all all-man buildenv buildenvvars buildkernel buildworld \
+TGTS=	all all-man buildenv buildenvvars buildetc buildkernel buildworld \
 	check check-old check-old-dirs check-old-files check-old-libs \
 	checkdpadd checkworld clean cleandepend cleandir cleankernel \
 	cleanworld cleanuniverse \
 	delete-old delete-old-dirs delete-old-files delete-old-libs \
 	depend distribute distributekernel distributekernel.debug \
 	distributeworld distrib-dirs distribution doxygen \
-	everything hier hierarchy install installcheck installkernel \
+	everything hier hierarchy install installcheck installetc installkernel \
 	installkernel.debug packagekernel packageworld \
 	reinstallkernel reinstallkernel.debug \
 	installworld kernel-toolchain libraries maninstall \
diff --git a/Makefile.inc1 b/Makefile.inc1
index aa65711fbc0b..f8d4b4333d99 100644
--- a/Makefile.inc1
+++ b/Makefile.inc1
@@ -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
 #



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202307270412.36R4C5S4097722>