Hi,
A makefile of mine was broken by Make 4.4 and I'm wondering if that's expected.
Consider this silly Makefile:
foo:
$(MAKE) $(shell $(MAKE) bar)
bar:
@echo baz
baz:
@echo BAZ
.PHONY: foo bar baz
With Make 4.3 if I run 'make' then I get this output:
make baz
make[1]: Entering directory '/tmp/make'
BAZ
make[1]: Leaving directory '/tmp/make'
With Make 4.4 I get an error:
make make[1]: Entering directory '/tmp/make' baz make[1]: Leaving
directory '/tmp/make'
make[1]: Entering directory '/tmp/make'
make[1]: *** No rule to make target 'make[1]:'. Stop.
make[1]: Leaving directory '/tmp/make'
make: *** [Makefile:2: foo] Error 2
This left me puzzled for a while, but what's happening is that the output of
$(shell $(MAKE) bar)
now includes the --print-directory output, so where the recipe for
'foo' used to do simply `make baz` now it is `make make[1] Entering
directory etc.`
Is this an intended consequence of the changes to --print-directory
handling in 4.4?
I can restore the old behaviour of my makefile by adding -s to the
make command invoked using $(shell), is that the expected way to fix
this problem?
Thanks for any insight.