Merge topic 'watcom-VERBOSE-and-ERROR'
f1b689b6 Makefile: Improve handling of WMake verbose output and errors
This commit is contained in:
commit
1b809c09ff
@ -43,11 +43,10 @@ void cmGlobalWatcomWMakeGenerator
|
|||||||
cmLocalGenerator *cmGlobalWatcomWMakeGenerator::CreateLocalGenerator()
|
cmLocalGenerator *cmGlobalWatcomWMakeGenerator::CreateLocalGenerator()
|
||||||
{
|
{
|
||||||
cmLocalUnixMakefileGenerator3* lg = new cmLocalUnixMakefileGenerator3;
|
cmLocalUnixMakefileGenerator3* lg = new cmLocalUnixMakefileGenerator3;
|
||||||
lg->SetSilentNoColon(true);
|
|
||||||
lg->SetDefineWindowsNULL(true);
|
lg->SetDefineWindowsNULL(true);
|
||||||
lg->SetWindowsShell(true);
|
lg->SetWindowsShell(true);
|
||||||
lg->SetWatcomWMake(true);
|
lg->SetWatcomWMake(true);
|
||||||
lg->SetMakeSilentFlag("-s -h -e");
|
lg->SetMakeSilentFlag("-h");
|
||||||
lg->SetGlobalGenerator(this);
|
lg->SetGlobalGenerator(this);
|
||||||
lg->SetIgnoreLibPrefix(true);
|
lg->SetIgnoreLibPrefix(true);
|
||||||
lg->SetPassMakeflags(false);
|
lg->SetPassMakeflags(false);
|
||||||
|
@ -80,7 +80,6 @@ static std::string cmSplitExtension(std::string const& in, std::string& base)
|
|||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
cmLocalUnixMakefileGenerator3::cmLocalUnixMakefileGenerator3()
|
cmLocalUnixMakefileGenerator3::cmLocalUnixMakefileGenerator3()
|
||||||
{
|
{
|
||||||
this->SilentNoColon = false;
|
|
||||||
this->WindowsShell = false;
|
this->WindowsShell = false;
|
||||||
this->IncludeDirective = "include";
|
this->IncludeDirective = "include";
|
||||||
this->MakefileVariableSize = 0;
|
this->MakefileVariableSize = 0;
|
||||||
@ -758,15 +757,17 @@ cmLocalUnixMakefileGenerator3
|
|||||||
depends.push_back(".hpux_make_needs_suffix_list");
|
depends.push_back(".hpux_make_needs_suffix_list");
|
||||||
this->WriteMakeRule(makefileStream, 0,
|
this->WriteMakeRule(makefileStream, 0,
|
||||||
".SUFFIXES", depends, no_commands, false);
|
".SUFFIXES", depends, no_commands, false);
|
||||||
|
if(this->WatcomWMake)
|
||||||
cmGlobalUnixMakefileGenerator3* gg =
|
{
|
||||||
static_cast<cmGlobalUnixMakefileGenerator3*>(this->GlobalGenerator);
|
// Switch on WMake feature, if an error or interrupt occurs during
|
||||||
// Write special target to silence make output. This must be after
|
// makefile processing, the current target being made may be deleted
|
||||||
// the default target in case VERBOSE is set (which changes the
|
// without prompting (the same as command line -e option).
|
||||||
// name). The setting of CMAKE_VERBOSE_MAKEFILE to ON will cause a
|
makefileStream <<
|
||||||
// "VERBOSE=1" to be added as a make variable which will change the
|
"\n"
|
||||||
// name of this special target. This gives a make-time choice to
|
".ERASE\n"
|
||||||
// the user.
|
"\n"
|
||||||
|
;
|
||||||
|
}
|
||||||
if(this->Makefile->IsOn("CMAKE_VERBOSE_MAKEFILE"))
|
if(this->Makefile->IsOn("CMAKE_VERBOSE_MAKEFILE"))
|
||||||
{
|
{
|
||||||
makefileStream
|
makefileStream
|
||||||
@ -774,12 +775,22 @@ cmLocalUnixMakefileGenerator3
|
|||||||
<< "VERBOSE = 1\n"
|
<< "VERBOSE = 1\n"
|
||||||
<< "\n";
|
<< "\n";
|
||||||
}
|
}
|
||||||
if(this->SilentNoColon)
|
if(this->WatcomWMake)
|
||||||
{
|
{
|
||||||
makefileStream << "$(VERBOSE).SILENT\n";
|
makefileStream <<
|
||||||
|
"!ifndef VERBOSE\n"
|
||||||
|
".SILENT\n"
|
||||||
|
"!endif\n"
|
||||||
|
;
|
||||||
}
|
}
|
||||||
else
|
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,
|
this->WriteMakeRule(makefileStream,
|
||||||
"Suppress display of executed commands.",
|
"Suppress display of executed commands.",
|
||||||
"$(VERBOSE).SILENT",
|
"$(VERBOSE).SILENT",
|
||||||
@ -789,6 +800,8 @@ cmLocalUnixMakefileGenerator3
|
|||||||
|
|
||||||
// Work-around for makes that drop rules that have no dependencies
|
// Work-around for makes that drop rules that have no dependencies
|
||||||
// or commands.
|
// or commands.
|
||||||
|
cmGlobalUnixMakefileGenerator3* gg =
|
||||||
|
static_cast<cmGlobalUnixMakefileGenerator3*>(this->GlobalGenerator);
|
||||||
std::string hack = gg->GetEmptyRuleHackDepends();
|
std::string hack = gg->GetEmptyRuleHackDepends();
|
||||||
if(!hack.empty())
|
if(!hack.empty())
|
||||||
{
|
{
|
||||||
|
@ -120,12 +120,6 @@ public:
|
|||||||
*/
|
*/
|
||||||
void SetUnixCD(bool v) {this->UnixCD = v;}
|
void SetUnixCD(bool v) {this->UnixCD = v;}
|
||||||
|
|
||||||
/**
|
|
||||||
* Set Support Verbose Variable. If true, then .SILENT will
|
|
||||||
* be not end with : i.e. .SILENT: or .SILENT
|
|
||||||
*/
|
|
||||||
void SetSilentNoColon(bool v) {this->SilentNoColon = v;}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the string used to include one makefile into another default
|
* Set the string used to include one makefile into another default
|
||||||
* is include.
|
* is include.
|
||||||
@ -339,7 +333,6 @@ private:
|
|||||||
bool DefineWindowsNULL;
|
bool DefineWindowsNULL;
|
||||||
bool UnixCD;
|
bool UnixCD;
|
||||||
bool PassMakeflags;
|
bool PassMakeflags;
|
||||||
bool SilentNoColon;
|
|
||||||
bool MakeCommandEscapeTargetTwice;
|
bool MakeCommandEscapeTargetTwice;
|
||||||
bool BorlandMakeCurlyHack;
|
bool BorlandMakeCurlyHack;
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
|
Loading…
x
Reference in New Issue
Block a user