On Thu, 2010-01-21 at 18:17 +0100, gabriele balducci wrote: > t1 : > rm -f ./mom && touch ./mom && echo "$(MAKE)" > > All works as if the `-n' option is not honored when the variable > $(MAKE) (and apparently only that) is referenced in a target's shell > line: > > make -n t1 will create ./mom (while it should not)
This is not a bug in make, per se, it's an error in the makefile. This behavior is documented in the manual, where it says: The `-n', `-t', and `-q' options do not affect command lines that begin with `+' characters or contain the strings `$(MAKE)' or `${MAKE}'. Note that only the line containing the `+' character or the strings `$(MAKE)' or `${MAKE}' is run regardless of these options. The makefile needs to not use the MAKE variable in a context where it would do bad things given -n. _______________________________________________ Bug-make mailing list Bug-make@gnu.org http://lists.gnu.org/mailman/listinfo/bug-make