[bug #58013] .SILENT appears to be ignored in GNU Make 4.3

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

[bug #58013] .SILENT appears to be ignored in GNU Make 4.3

Yann E. MORIN
URL:
  <https://savannah.gnu.org/bugs/?58013>

                 Summary: .SILENT appears to be ignored in GNU Make 4.3
                 Project: make
            Submitted by: None
            Submitted on: Fri 20 Mar 2020 08:06:48 AM UTC
                Severity: 3 - Normal
              Item Group: Bug
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
       Component Version: 4.3
        Operating System: POSIX-Based
           Fixed Release: None
           Triage Status: None

    _______________________________________________________

Details:

Hello,

I noticed that after upgrading GNU Make to 4.3 messages such as these:

make[1]: Entering directory '/.../test/a'
make[1]: Leaving directory '/.../test/a'

started to appear when building my project. The Makefile is a complex one
which is generated by CMake. CMake tries to suppress such output by default,
by inserting ".SILENT:" in the generated Makefile. Starting with GNU Make 4.3
this directive appears to be ignored, as illustrated with this toy project:

$ find . | sort
.   (directory)
./a (directory)
./a/Makefile
./Makefile

$ cat Makefile
.SILENT:
all: a
.PHONY: a
a: %:
        $(MAKE) -C $@

$ cat a/Makefile
all: a
.PHONY: a
a:
        echo hello





    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?58013>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/


Reply | Threaded
Open this post in threaded view
|

[bug #58013] .SILENT appears to be ignored in GNU Make 4.3

Yann E. MORIN
Follow-up Comment #1, bug #58013 (project make):

This is intentional.
See https://savannah.gnu.org/bugs/?54740.

    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?58013>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/


Reply | Threaded
Open this post in threaded view
|

[bug #58013] .SILENT appears to be ignored in GNU Make 4.3

Yann E. MORIN
Follow-up Comment #2, bug #58013 (project make):

Thanks for the link. I see this in the 4.3 release notes now that I know what
I was looking for:

> [SV 54740] Ensure .SILENT settings do not leak into sub-makes

I've filed an issue on our side to handle this new behavior.

https://gitlab.kitware.com/cmake/cmake/issues/20487

Thanks.

    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?58013>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/


Reply | Threaded
Open this post in threaded view
|

[bug #58013] .SILENT no longer suppresses "Entering directory"

Yann E. MORIN
Follow-up Comment #4, bug #58013 (project make):

"Entering directory' message when the user is not expecting one is a benign
backward incompatibility. i'd be more concern about the opposite.
Also, reinstating the prior behavior is incompatible with 4.3.

    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?58013>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/


Reply | Threaded
Open this post in threaded view
|

[bug #58013] .SILENT no longer suppresses "Entering directory"

Yann E. MORIN
Follow-up Comment #7, bug #58013 (project make):

Posix is explicit that -s and .SILENT are both about command lines.
If we wanted to be strictly posix conformant 'Entering directory' should be
printed even when -s is specified.
if .SILENT is stretched to suppress other messages such as 'Entering
directory' the question arises which other messages should .SILENT suppress?
e.g. if the directory is not executable make prints "permission denied".
Should "permission denied" be suppressed? What about $(warning ) messages, "is
up to date" messages, etc?

    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?58013>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/


Reply | Threaded
Open this post in threaded view
|

[bug #58013] .SILENT no longer suppresses "Entering directory"

Yann E. MORIN
Follow-up Comment #9, bug #58013 (project make):

FWIW I thought of another way to do this in a portable way:


submake: ; GNUMAKEFLAGS=--no-print-directory $(MAKE) recurse


or some form of that.

    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?58013>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/