Consider the command make --eval '$(error $(shell echo foo && echo $$_))'
(or equivalent makefile for make versions before 3.82 where eval option seems to have been added). I'd expect this to output "foo foo" and this is what happens with gmake 3.82.90 under Cygwin. But gmake 3.81 and 4.0 under Debian output "foo /usr/bin/make" instead.
Does anybody understand why does this happen?
Of course, in the real makefile the first part of the shell command is a bit more complicated than a simple echo and the idea was to output its argument only if the command was successful and leave it empty otherwise to indicate failure. This seemed more elegant than other alternatives to me and worked in initial testing (under Cygwin) but obviously I'd have to do something else now...
GNU Make 4.0
from the debian package but I do not see that withGNU Make 4.0
built manually on CentOS 5. I getfoo foo
from the self-built version of CentOS.pacman
on Arch Linux also printsfoo foo
.