From 0dfaefa975477cee2ec3155c3e0689ba1fcdde9a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dag-Erling=20Sm=C3=B8rgrav?= Date: Wed, 8 Feb 2023 23:58:51 +0100 Subject: depend-cleanup.sh: Simplify the logic, and clean bootstrap tools. * There's no need to check if the file exists before grepping it; if it does not exist, grep will fail, which is what we want. Just redirect the error message to /dev/null. * There's no need to split the .o and .pico cases; the bodies are identical, so combine the conditions. Use a glob to avoid a false negative if one exists but not the other. * Also run depend-cleanup.sh on the bootstrap build tree. This unbreaks the build after 29c5f8bf9a01. Sponsored by: Klara, Inc. Sponsored by: NetApp, Inc. Reviewed by: imp, emaste Differential Revision: https://reviews.freebsd.org/D38447 --- Makefile.inc1 | 3 +++ 1 file changed, 3 insertions(+) (limited to 'Makefile.inc1') diff --git a/Makefile.inc1 b/Makefile.inc1 index 2f84d882e966..c5848be438a2 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -1062,6 +1062,9 @@ _bootstrap-tools: @echo "--------------------------------------------------------------" @echo ">>> stage 1.2: bootstrap tools" @echo "--------------------------------------------------------------" +.if ${MK_CLEAN} != "yes" + ${_+_}cd ${.CURDIR}; ${BMAKE} _NO_INCLUDE_COMPILERMK=t _cleanobj_fast_depend_hack +.endif ${_+_}cd ${.CURDIR}; ${BMAKE} bootstrap-tools mkdir -p ${WORLDTMP}/usr ${WORLDTMP}/lib/casper ${WORLDTMP}/lib/geom \ ${WORLDTMP}/bin -- cgit v1.2.3