bug-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

.SILENT: clobbered by .SILENT: with_target


From: Britton Kerin
Subject: .SILENT: clobbered by .SILENT: with_target
Date: Tue, 11 Jan 2022 11:49:12 -0900

.SILENT: (without prerequisites) doesn't work as expected when
.SILENT: some_target (with prerequisites) is present:

     $ cat Makefile
     .SILENT:

     .SILENT: target_a
     target_a:
             echo target_a_recipe

     target_b:
             echo target_b_recipe
     $ make target_b
     echo target_b_recipe
     target_b_recipe
     $

It looks like the .SILENT: with a recipe clobbers the .SILENT:
without, which is at best undocumented spooky action-at-a-distance wrt
target_b behavior.  Reversing the order of the two .SILENT:
declarations gives the same behavior.  I think what should happen is
the global .SILENT: (with no prerequisites) wins.  Whether other
.SILENT: with_targets in the same run should then result in an error
or warning is debatable.  I guess this could be a breaking change but
the present behavior seems clearly buggy.  Is there a strategy for
incrementally changing this sort of thing?

Britton



reply via email to

[Prev in Thread] Current Thread [Next in Thread]