On Fri, Jun 9, 2023 at 9:39 PM Paul D. Smith <invalid.nore...@gnu.org> wrote: > > Update of bug #64288 (project make): > > Status: None => Not A Bug > Open/Closed: Open => Closed > > _______________________________________________________ > > Follow-up Comment #1: > > This behavior is intentional: setting MAKEFLAGS as a make variable assignment > modifies the behavior of the currently-running make. If users want to disable > printing directories for the current makefile they can do so by setting the > MAKEFLAGS variable. > > If you don't want to disable this setting for this instance of make, don't add > it to MAKEFLAGS. > > If you want to leave print-directories for this makefile but have it unset for > children of this makefile, then you can add the flag to the invocation of the > child makes.
I argue this change is not sensible. It is strange to have the sub-make control the "Entering directory sub". Child makefiles do not know how the parent has invoked it. Only the parent makefile knows whether it is changing the working directory or not. If a parent invokes a sub make like this, .PHONY: sub sub: $(MAKE) -C sub "Entering directory sub" must be displayed because it is changing the working directory. If a parent invokes a sub make like this, .PHONY: sub sub: $(MAKE) -f sub/Makefile "Entering directory ..." is just annoying because it is staying at the same working directory. Linux kernel build system uses both styles. In most cases, Kbuild uses the "-f <sub-dir>/Makefile" and suppresses the "Entering ...". Kbuild sometimes needs to change the working directory, in this case, "Entering ..." is mandatory because IDEs are tracking the working directories. Now, Kbuild is broken, so I need to fix it. https://lore.kernel.org/linux-kbuild/CAK7LNAS1=RtTTYk=+q2YsGmMNQ6EwhAx=stej+cxzwknzt6...@mail.gmail.com/T/#m7757ec3b62dd541014fcfa1cd6b84432222e4286 You could still argue to add --no-print-directory to every place: .PHONY: sub sub: $(MAKE) --no-print-directory -f sub/Makefile But, there are a lot of locations invoking the submakes. Do I need to add --no-print-directory to all of them? .PHONY: sub1 sub1: $(MAKE) --no-print-directory -f sub1/Makefile .PHONY: sub2 sub2: $(MAKE) --no-print-directory -f sub2/Makefile .PHONY: sub3 sub3: $(MAKE) --no-print-directory -f sub3/Makefile Previously, I was able to do "MAKEFLAGS += --no-print-directory" in a single place, but it is now impossible. -- Best Regards Masahiro Yamada