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 '<tool> 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
This commit is contained in:
Andrew Turner
2025-06-28 02:55:41 +01:00
parent 83b08f4026
commit 5d0cf80f45
+1 -1
View File
@@ -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; \