https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125956
--- Comment #14 from Jonathan Wakely <redi at gcc dot gnu.org> ---
The problem is that relpath.sh exits successfully when invoked incorrectly:
if [ "$1" = "--help" -o $# -ne 2 -o -f "$1" ]; then
echo Usage: relpath.sh FROM TO
echo Print the relative path from FROM to TO
echo FROM must be a directory, but need not exist
exit 0
fi
This means that relpath=$(relpath.sh invalid ) && sed "s,@MODPATH@,$$relpath,"
... does not short-circuit, it tries to run the sed command.
I can fix relpath.sh so that it exits with a non-zero status, but the real
question is why relpath.sh is being invoked with no arguments. I suspect this
is due to the handling of backslash-newline sequences.
Which version of Make are you using?