summaryrefslogtreecommitdiff
path: root/Source/cmLocalUnixMakefileGenerator3.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-03-23 08:51:15 -0400
committerBrad King <brad.king@kitware.com>2020-03-26 07:34:24 -0400
commitd6d9da5178e944e66330156a1292e621235eda05 (patch)
treebc446ac9027fa49d9922a7914529bdbf9f567913 /Source/cmLocalUnixMakefileGenerator3.cxx
parentb7d8c91822101ff9de07075e9b1f02e18c2725da (diff)
downloadcmake-d6d9da5178e944e66330156a1292e621235eda05.tar.gz
Makefiles: Fix silencing of nested calls for GNU make 4.3
Since GNU make 4.3, `.SILENT:` no longer causes nested `$(MAKE)` calls to get `-s` implicitly. Add the `-s` flag explicitly on such calls to suppress messages about Entering/Leaving directories. Fixes: #20487
Diffstat (limited to 'Source/cmLocalUnixMakefileGenerator3.cxx')
-rw-r--r--Source/cmLocalUnixMakefileGenerator3.cxx6
1 files changed, 5 insertions, 1 deletions
diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx
index 4a70248d6f..919fb74a22 100644
--- a/Source/cmLocalUnixMakefileGenerator3.cxx
+++ b/Source/cmLocalUnixMakefileGenerator3.cxx
@@ -712,6 +712,10 @@ void cmLocalUnixMakefileGenerator3::WriteSpecialTargetsTop(
;
/* clang-format on */
} else {
+ makefileStream << "# Command-line flag to silence nested $(MAKE).\n"
+ "$(VERBOSE)MAKESILENT = -s\n"
+ "\n";
+
// Write special target to silence make output. This must be after
// the default target in case VERBOSE is set (which changes the
// name). The setting of CMAKE_VERBOSE_MAKEFILE to ON will cause a
@@ -1910,7 +1914,7 @@ std::string cmLocalUnixMakefileGenerator3::GetRecursiveMakeCall(
{
// Call make on the given file.
std::string cmd = cmStrCat(
- "$(MAKE) -f ",
+ "$(MAKE) $(MAKESILENT) -f ",
this->ConvertToOutputFormat(makefile, cmOutputConverter::SHELL), ' ');
cmGlobalUnixMakefileGenerator3* gg =