Browse Source

Merge topic 'make-nested-silent'

d6d9da5178 Makefiles: Fix silencing of nested calls for GNU make 4.3

Acked-by: Kitware Robot <[email protected]>
Merge-request: !4515
Brad King 5 years ago
parent
commit
610759fa3e
1 changed files with 5 additions and 1 deletions
  1. 5 1
      Source/cmLocalUnixMakefileGenerator3.cxx

+ 5 - 1
Source/cmLocalUnixMakefileGenerator3.cxx

@@ -725,6 +725,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
@@ -1919,7 +1923,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 =