severity 12554 minor tags 12554 + patch thanks On 10/01/2012 11:52 PM, Michael Daniels wrote: > Hello, > Hi Michael, sorry for the delay.
> automake 1.11.3 > make 3.81 > Linux 3.2.0-23-generic x86_64 > > Just to get some initial context, automake is generating this code for > recursive targets: > > # This directory's subdirectories are mostly independent; you can cd > # into them and run `make' without going through this Makefile. > # To change the values of `make' variables: instead of editing Makefiles, > # (1) if the variable is set in `config.status', edit `config.status' > # (which will cause the Makefiles to be regenerated when you run `make'); > # (2) otherwise, pass the desired values on the `make' command line. > $(RECURSIVE_TARGETS): > @fail= failcom='exit 1'; \ > for f in x $$MAKEFLAGS; do \ > case $$f in \ > *=* | --[!k]*);; \ > *k*) failcom='fail=yes';; \ > esac; \ > done; \ > dot_seen=no; \ > target=`echo $@ | sed s/-recursive//`; \ > .. and so on > > Today I happened to set the environment variable > MAKEFLAGS=-I/some/path/with/k/ > and this was causing it to hit the *k* case unexpectedly due to the k in the > include path. The only side effect was that when something fails to build, it > zips past the terminal very quickly as it continues on making the other > subdir's, > very minor. The following makefile can be used to reproduce the behaviour: > > $ cat Makefile > all: > @echo MAKEFLAGS = $(MAKEFLAGS) > $ make -k -s > MAKEFLAGS = sk > $ make -k -s -I. > MAKEFLAGS = skI . > $ make -k -s -I. -I/some/path/with/k/ > MAKEFLAGS = skI . -I /some/path/with/k/ > $ make -s -I. -I/some/path/with/k/ > MAKEFLAGS = sI . -I /some/path/with/k/ > $ make -s -I. -I/some/path/with/k/ -j2 > MAKEFLAGS = s --jobserver-fds=3,4 -j -I . -I /some/path/with/k/ > $ > > So because the path is parsed in the loop, it is always matching *k*. > The MAKEFLAGS behaviour is described in the manual here: > http://www.gnu.org/software/make/manual/html_node/Options_002fRecursion.html. > > Unfortunately I do not know enough about these tools to suggest a proper fix, > but to make things worse the behaviour does not seem to be uniform across > platforms; http://www.hep.by/gnu/autoconf/The-Make-Macro-MAKEFLAGS.html > > Thanks, > > Mike > I've prepared a patch series that appears to fix the issue. I will post it here soon. Testing and feedback is appreciated. Barring objections, I'm going to push the series to the branch-1.13.2 in a couple of days. Thanks, Stefano