From 30e685b41f9dc18bfdde373b9265bebaafb0b9d9 Mon Sep 17 00:00:00 2001 From: Brad King Date: Wed, 3 Nov 2004 08:59:13 -0500 Subject: [PATCH] ENH: Removed unneeded requires rules now that canonical names are available. --- Source/cmLocalUnixMakefileGenerator2.cxx | 34 ++++-------------------- Source/cmLocalUnixMakefileGenerator2.h | 2 -- 2 files changed, 5 insertions(+), 31 deletions(-) diff --git a/Source/cmLocalUnixMakefileGenerator2.cxx b/Source/cmLocalUnixMakefileGenerator2.cxx index 131a6e322..7e772b985 100644 --- a/Source/cmLocalUnixMakefileGenerator2.cxx +++ b/Source/cmLocalUnixMakefileGenerator2.cxx @@ -974,13 +974,15 @@ cmLocalUnixMakefileGenerator2 // Special target to cleanup operation of make tool. std::vector depends; - depends.push_back(".hpux_make_must_have_this_dependency_here"); this->WriteMakeRule(makefileStream, - "Disable some common implicit rules to speed things up.", + "Disable implicit rules so canoncical targets will work.", 0, ".SUFFIXES", depends, no_commands); + depends.push_back(".hpux_make_must_have_suffixes_list"); + this->WriteMakeRule(makefileStream, 0, 0, + ".SUFFIXES", depends, no_commands); } //---------------------------------------------------------------------------- @@ -1048,7 +1050,7 @@ cmLocalUnixMakefileGenerator2 { if(t->second.IsInAll()) { - depends.push_back(t->first+".requires"); + depends.push_back(t->first); } } } @@ -1219,25 +1221,6 @@ cmLocalUnixMakefileGenerator2 tgt.c_str(), depends, commands); } -//---------------------------------------------------------------------------- -void -cmLocalUnixMakefileGenerator2 -::WriteRequiresRule(std::ostream& ruleFileStream, const cmTarget& target, - const char* targetFullPath) -{ - // TODO: Avoid using requires target except when needed for - // Fortran/Java dependencies. - std::vector depends; - std::vector no_commands; - std::string reqComment = "Requirements for target "; - reqComment += target.GetName(); - std::string reqTarget = target.GetName(); - reqTarget += ".requires"; - depends.push_back(targetFullPath); - this->WriteMakeRule(ruleFileStream, reqComment.c_str(), 0, - reqTarget.c_str(), depends, no_commands); -} - //---------------------------------------------------------------------------- void cmLocalUnixMakefileGenerator2 @@ -1448,9 +1431,6 @@ cmLocalUnixMakefileGenerator2 // Write convenience targets. this->WriteConvenienceRules(ruleFileStream, target, targetFullPath.c_str()); - - // Write driver rule for this target. - this->WriteRequiresRule(ruleFileStream, target, targetFullPath.c_str()); } //---------------------------------------------------------------------------- @@ -1702,9 +1682,6 @@ cmLocalUnixMakefileGenerator2 // Write convenience targets. this->WriteConvenienceRules(ruleFileStream, target, targetFullPath.c_str()); - - // Write driver rule for this target. - this->WriteRequiresRule(ruleFileStream, target, targetFullPath.c_str()); } //---------------------------------------------------------------------------- @@ -2087,7 +2064,6 @@ cmLocalUnixMakefileGenerator2 dep += ".depends"; dep = this->ConvertToRelativeOutputPath(dep.c_str()); std::string tgt = jump->first; - tgt += ".requires"; tgt = this->ConvertToRelativeOutputPath(tgt.c_str()); // Build the jump-and-build command list. diff --git a/Source/cmLocalUnixMakefileGenerator2.h b/Source/cmLocalUnixMakefileGenerator2.h index c2381550e..3c62a2fbe 100644 --- a/Source/cmLocalUnixMakefileGenerator2.h +++ b/Source/cmLocalUnixMakefileGenerator2.h @@ -87,8 +87,6 @@ protected: const char* subdir, std::string& last); void WriteSubdirDriverRule(std::ostream& makefileStream, const char* pass, const char* order, const std::string& last); - void WriteRequiresRule(std::ostream& ruleFileStream, const cmTarget& target, - const char* targetFullPath); void WriteConvenienceRules(std::ostream& ruleFileStream, const cmTarget& target, const char* targetFullPath);