diff options
author | Jiri Malak <malak.jiri@gmail.com> | 2014-03-09 09:41:06 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2014-03-10 15:15:12 (GMT) |
commit | f1b689b64a96fbf1e6f3b154d1bd4ee28ea3d625 (patch) | |
tree | dd7f9052420299890eeae6c162e72c1f00a63f1f /Source/cmLocalUnixMakefileGenerator3.cxx | |
parent | e21ffaf8fe5499426604b4ebb9cd08798ee6107c (diff) | |
download | CMake-f1b689b64a96fbf1e6f3b154d1bd4ee28ea3d625.zip CMake-f1b689b64a96fbf1e6f3b154d1bd4ee28ea3d625.tar.gz CMake-f1b689b64a96fbf1e6f3b154d1bd4ee28ea3d625.tar.bz2 |
Makefile: Improve handling of WMake verbose output and errors
* The '-e' option has nothing to do with verbose output.
It is now properly handled by .ERASE directive in make file
* The '-s' option sets silent output globally, it cannot be switched off.
It is now handled only by .SILENT directive in make file directive
is simply controlled by a conditonal block.
Remove SilentNoColon member variable as it is no longer needed.
Diffstat (limited to 'Source/cmLocalUnixMakefileGenerator3.cxx')
-rw-r--r-- | Source/cmLocalUnixMakefileGenerator3.cxx | 37 |
1 files changed, 25 insertions, 12 deletions
diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx index f7088c2..935da57 100644 --- a/Source/cmLocalUnixMakefileGenerator3.cxx +++ b/Source/cmLocalUnixMakefileGenerator3.cxx @@ -80,7 +80,6 @@ static std::string cmSplitExtension(std::string const& in, std::string& base) //---------------------------------------------------------------------------- cmLocalUnixMakefileGenerator3::cmLocalUnixMakefileGenerator3() { - this->SilentNoColon = false; this->WindowsShell = false; this->IncludeDirective = "include"; this->MakefileVariableSize = 0; @@ -758,15 +757,17 @@ cmLocalUnixMakefileGenerator3 depends.push_back(".hpux_make_needs_suffix_list"); this->WriteMakeRule(makefileStream, 0, ".SUFFIXES", depends, no_commands, false); - - cmGlobalUnixMakefileGenerator3* gg = - static_cast<cmGlobalUnixMakefileGenerator3*>(this->GlobalGenerator); - // 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 - // "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. + if(this->WatcomWMake) + { + // Switch on WMake feature, if an error or interrupt occurs during + // makefile processing, the current target being made may be deleted + // without prompting (the same as command line -e option). + makefileStream << + "\n" + ".ERASE\n" + "\n" + ; + } if(this->Makefile->IsOn("CMAKE_VERBOSE_MAKEFILE")) { makefileStream @@ -774,12 +775,22 @@ cmLocalUnixMakefileGenerator3 << "VERBOSE = 1\n" << "\n"; } - if(this->SilentNoColon) + if(this->WatcomWMake) { - makefileStream << "$(VERBOSE).SILENT\n"; + makefileStream << + "!ifndef VERBOSE\n" + ".SILENT\n" + "!endif\n" + ; } else { + // 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 + // "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", @@ -789,6 +800,8 @@ cmLocalUnixMakefileGenerator3 // Work-around for makes that drop rules that have no dependencies // or commands. + cmGlobalUnixMakefileGenerator3* gg = + static_cast<cmGlobalUnixMakefileGenerator3*>(this->GlobalGenerator); std::string hack = gg->GetEmptyRuleHackDepends(); if(!hack.empty()) { |