From 5d0cf80f4501fb297bc546b624a0e527040a1843 Mon Sep 17 00:00:00 2001 From: Andrew Turner Date: Sat, 28 Jun 2025 02:55:41 +0100 Subject: [PATCH] Makefile.inc1: Always have which succeed In bootstrap-tools we search for some tools to copy into the obj tree. If the tool is missing in the host environment then the '[ ! -e ... ]' check will fail as which will print ' not found'. There is an issue that which will also return an error so we never get to the check and don't print the error message. As which outputs an invalid path on failure we can just add || true to ensure make continues. Reviewed by: kevans Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D51075 --- Makefile.inc1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile.inc1 b/Makefile.inc1 index e7b1a2d7acb..d366be09f49 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -2758,7 +2758,7 @@ ${_bt}-links: .PHONY .for _tool in ${_bootstrap_tools_links} ${_bt}-link-${_tool}: .PHONY @rm -f "${WORLDTMP}/legacy/bin/${_tool}"; \ - source_path=`which ${_tool}`; \ + source_path=`which ${_tool} || true`; \ if [ ! -e "$${source_path}" ] ; then \ echo "Cannot find host tool '${_tool}'"; false; \ fi; \