diff options
author | Daniel Colascione <dancol@dancol.org> | 2020-06-22 00:40:25 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2020-06-22 12:48:53 (GMT) |
commit | 7f78bc42cbbc6399d4baca21b49a3ac43edf638d (patch) | |
tree | d85d4267fa0e1962d032a316da2668a421aa60cb /Source/cmLocalUnixMakefileGenerator3.cxx | |
parent | e66fe75792a2fbe9f3ffe237c748008906ae7116 (diff) | |
download | CMake-7f78bc42cbbc6399d4baca21b49a3ac43edf638d.zip CMake-7f78bc42cbbc6399d4baca21b49a3ac43edf638d.tar.gz CMake-7f78bc42cbbc6399d4baca21b49a3ac43edf638d.tar.bz2 |
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:
Diffstat (limited to 'Source/cmLocalUnixMakefileGenerator3.cxx')
-rw-r--r-- | Source/cmLocalUnixMakefileGenerator3.cxx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx index 4545a8e..de1461a 100644 --- a/Source/cmLocalUnixMakefileGenerator3.cxx +++ b/Source/cmLocalUnixMakefileGenerator3.cxx @@ -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 |