mirror of
https://github.com/Kitware/CMake.git
synced 2025-12-30 18:29:37 -06:00
Makefile: Fix regression in .SILENT rule
Since commit d74e651b78 (Makefiles: Re-implement makefile target path
escaping and quoting, 2020-04-10, v3.18.0-rc1~334^2~1), `WriteMakeRule`
now correctly escapes `$` in make target paths as `$$`. However, this
caused an existing call site to escape the `$(VERBOSE)` variable
reference in the `.SILENT` prefix, making it ineffective. Sub-makefiles
are invoked with `MAKESILENT`, so this bug matters only for the `all`
target, which emits progress messages from toplevel.
Before:
# Suppress display of executed commands.
$$(VERBOSE).SILENT:
After:
# Suppress display of executed commands.
$(VERBOSE).SILENT:
This commit is contained in:
committed by
Brad King
parent
e66fe75792
commit
7f78bc42cb
@@ -713,9 +713,10 @@ void cmLocalUnixMakefileGenerator3::WriteSpecialTargetsTop(
|
||||
// "VERBOSE=1" to be added as a make variable which will change the
|
||||
// name of this special target. This gives a make-time choice to
|
||||
// the user.
|
||||
this->WriteMakeRule(makefileStream,
|
||||
"Suppress display of executed commands.",
|
||||
"$(VERBOSE).SILENT", no_depends, no_commands, false);
|
||||
// Write directly to the stream since WriteMakeRule escapes '$'.
|
||||
makefileStream << "#Suppress display of executed commands.\n"
|
||||
"$(VERBOSE).SILENT:\n"
|
||||
"\n";
|
||||
}
|
||||
|
||||
// Work-around for makes that drop rules that have no dependencies
|
||||
|
||||
Reference in New Issue
Block a user