Bug 239333 - bmake Entering/Leaving messages not suppressed by .SILENT:
Summary: bmake Entering/Leaving messages not suppressed by .SILENT:
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-bugs mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-07-20 11:12 UTC by d
Modified: 2019-07-20 11:12 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description d 2019-07-20 11:12:08 UTC
URL: https://pubs.opengroup.org/onlinepubs/9699919799/utilities/make.html

POSIX.2017 states the following about -s: "Do not write makefile command lines or touch messages (see -t) to standard output before executing. This mode shall be the same as if the special target .SILENT were specified without prerequisites."

However, with -s the "Entering/Leaving directory ..." messages are suppressed, while with .SILENT: they're not.

I'm not sure whether bmake is actually aiming for POSIX compliance (it would seem so), if that's the case, this minor discrepancy should be fixed.

  ~% uname -a
  Linux a285 5.1.16-arch1-1-ARCH #1 SMP PREEMPT Wed Jul 3 20:23:07 UTC 2019 x86_64 GNU/Linux

  ~% pacman -Qi bmake | fgrep Version
  Version         : 20181221-1

Since this is relatively obscure bug, I assume this wasn't addressed before and all versions of bmake are affected.

To demonstrate, two Makefiles are needed. First:

  ~/bsdreport% cat Makefile
  .POSIX:
  .PHONY: all
  .SILENT:

  all:
          make -f Makefile.2

Second:

  ~/bsdreport% cat Makefile.2
  foo:
          touch $@

Then:

  ~/bsdreport% bmake
  make[1]: Entering directory '/home/d/bsdreport'
  make[1]: 'foo' is up to date.
  make[1]: Leaving directory '/home/d/bsdreport'

While bmake -s is indeed silent. (The help for -s states that -s is equivalent to prefixing each command with @; that's not true as adding @ before the recursive make call does not suppress the Entering/Leaving messages.)

Please let me know if I can provide further details.

- David