diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2001-12-20 20:46:37 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2001-12-20 20:46:37 (GMT) |
commit | 9402460977e207b531bd6799f7a072a610be85bc (patch) | |
tree | 500632478a14d6787b981dab0b5b222f25b3e556 /Source | |
parent | 9c0eb4eeb8fe40478410b5019909de62c1c647c1 (diff) | |
download | CMake-9402460977e207b531bd6799f7a072a610be85bc.zip CMake-9402460977e207b531bd6799f7a072a610be85bc.tar.gz CMake-9402460977e207b531bd6799f7a072a610be85bc.tar.bz2 |
ENH: add make silent flag for nmake and move .SILENT: directive to top of makefile
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmNMakeMakefileGenerator.cxx | 9 | ||||
-rw-r--r-- | Source/cmUnixMakefileGenerator.cxx | 10 |
2 files changed, 10 insertions, 9 deletions
diff --git a/Source/cmNMakeMakefileGenerator.cxx b/Source/cmNMakeMakefileGenerator.cxx index e9a11c5..a61c494 100644 --- a/Source/cmNMakeMakefileGenerator.cxx +++ b/Source/cmNMakeMakefileGenerator.cxx @@ -145,6 +145,7 @@ void cmNMakeMakefileGenerator::OutputMakeVariables(std::ostream& fout) "# general variables used in the makefile\n" "\n" "# Path to cmake\n" + "MAKESILENT = /nologo\n" "CMAKE_STANDARD_WINDOWS_LIBRARIES = @CMAKE_STANDARD_WINDOWS_LIBRARIES@\n" "CMAKE_C_FLAGS = @CMAKE_C_FLAGS@ @BUILD_FLAGS@\n" "CMAKE_C_LINK_EXECUTABLE_FLAG = @CMAKE_C_LINK_EXECUTABLE_FLAG@\n" @@ -242,15 +243,15 @@ void cmNMakeMakefileGenerator::BuildInSubDirectory(std::ostream& fout, dir = cmSystemTools::EscapeSpaces(dir.c_str()); fout << "\tif not exist " << dir << " " - << "$(MAKE) rebuild_cache\n" + << "$(MAKE) $(MAKESILENT) rebuild_cache\n" << "\techo Building " << target1 << " in directory " << directory << "\n" << "\tcd " << dir << "\n" - << "\t$(MAKE) -$(MAKEFLAGS) " << target1 << "\n"; + << "\t$(MAKE) -$(MAKEFLAGS) $(MAKESILENT) " << target1 << "\n"; } if(target2) { fout << "\techo Building " << target2 << " in directory " << directory << "\n"; - fout << "\t$(MAKE) -$(MAKEFLAGS) " << target2 << "\n"; + fout << "\t$(MAKE) -$(MAKEFLAGS) $(MAKESILENT) " << target2 << "\n"; } std::string currentDir = m_Makefile->GetCurrentOutputDirectory(); cmSystemTools::ConvertToWindowsSlashes(currentDir); @@ -699,7 +700,7 @@ void cmNMakeMakefileGenerator::OutputBuildLibraryInDir(std::ostream& fout, cmSystemTools::ConvertToWindowsSlashes(currentDir); fout << cmSystemTools::EscapeSpaces(fullpath) << ":\n\tcd " << cmSystemTools::EscapeSpaces(path) - << "\n\t$(MAKE) " << cmSystemTools::EscapeSpaces(fullpath) + << "\n\t$(MAKE) $(MAKESILENT) " << cmSystemTools::EscapeSpaces(fullpath) << "\n\tcd " << cmSystemTools::EscapeSpaces(currentDir.c_str()) << "\n"; } diff --git a/Source/cmUnixMakefileGenerator.cxx b/Source/cmUnixMakefileGenerator.cxx index 93e93cb..cff90ae 100644 --- a/Source/cmUnixMakefileGenerator.cxx +++ b/Source/cmUnixMakefileGenerator.cxx @@ -229,6 +229,8 @@ void cmUnixMakefileGenerator::OutputMakefile(const char* file) fout << "# " << i->c_str() << "\n"; } fout << "\n\n"; + fout << "# Suppresses display of executed commands\n"; + fout << ".SILENT:\n"; // create a make variable with all of the sources for this Makefile // for depend purposes. fout << "CMAKE_MAKEFILE_SOURCES = "; @@ -249,8 +251,8 @@ void cmUnixMakefileGenerator::OutputMakefile(const char* file) "Default target executed when no arguments are given to make", "default_target", 0, - "$(MAKE) -$(MAKEFLAGS) cmake.depends_mark", - "$(MAKE) -$(MAKEFLAGS) all"); + "$(MAKE) -$(MAKEFLAGS) $(MAKESILENT) cmake.depends_mark", + "$(MAKE) -$(MAKEFLAGS) $(MAKESILENT) all"); this->OutputTargetRules(fout); this->OutputDependLibs(fout); @@ -876,7 +878,7 @@ void cmUnixMakefileGenerator::OutputBuildLibraryInDir(std::ostream& fout, } fout << cmSystemTools::EscapeSpaces(fullpath) << ":\n\tcd " << cmSystemTools::EscapeSpaces(path) - << "; $(MAKE) " << makeTarget << "\n\n"; + << "; $(MAKE) $(MAKESILENT) " << makeTarget << "\n\n"; } bool cmUnixMakefileGenerator::SamePath(const char* path1, const char* path2) @@ -1504,8 +1506,6 @@ void cmUnixMakefileGenerator::OutputMakeRules(std::ostream& fout) "-@ $(RM) $(CLEAN_OBJECT_FILES) $(EXECUTABLES)" " $(TARGETS)"); } - fout << "# Suppresses display of executed commands\n"; - fout << ".SILENT:\n"; fout << "\n#Rule to build the cmake.depends and Makefile as side effect\n"; fout << "cmake.depends_mark: $(CMAKE_MAKEFILE_SOURCES)\n"; this->BuildInSubDirectory(fout, |