On 02/16/2016 12:34 PM, Manoj Srivastava wrote: > but POSIX sayeth > > | An execution line is built from the command line by removing > | any prefix characters. Except as described under the at-sign > | prefix, the execution line shall be written to the standard > | output, optionally preceded by a <tab>. The execution line | > | shall then be executed by a shell as if it were passed as the > | argument to the system( ) interface, except that the shell −e > | option shall also be in effect. > > The cause is that "make" expects to be run on a POSIX system, where > non-special shell builtins like "command" would be available for use by execvp > (see sh_cmds[] in job.c). See the explanation by Jilles Tjoelker at > http://bugs.debian.org/cgi-bin/bugreport.cgi?msg=43;bug=436466 > for more details. >
If you had stated that the bug is that the ".POSIX" target doesn't conform to this (from make info): `.POSIX' If `.POSIX' is mentioned as a target, then the makefile will be parsed and run in POSIX-conforming mode. This does _not_ mean that only POSIX-conforming makefiles will be accepted: all advanced GNU `make' features are still available. Rather, this target causes `make' to behave as required by POSIX in those areas where `make''s default behavior differs. In particular, if this target is mentioned then recipes will be invoked as if the shell had been passed the `-e' flag: the first failing command in a recipe will cause the recipe to fail immediately. Then I think you'd be right. In fact, in adding ".POSIX:" to your makefile _still_ results in the same error, so I would classify the bug as belonging to the .POSIX target failure to act "as if the shell had been passed the `-e' flag". Note that trying your makefile with "SHELL := /bin/sh -e" does result in the expected behavior, though its still a bug. -- ### Any similarity between my views and the truth is completely ### ### coincidental, except that they are endorsed by NO ONE ### _______________________________________________ Bug-make mailing list Bug-make@gnu.org https://lists.gnu.org/mailman/listinfo/bug-make