diff options
author | Ben Boeckel <ben.boeckel@kitware.com> | 2020-01-22 20:41:14 (GMT) |
---|---|---|
committer | Ben Boeckel <ben.boeckel@kitware.com> | 2020-01-24 14:06:25 (GMT) |
commit | 879e56f33602fc1cebaec67dd252b3eb19dc47fe (patch) | |
tree | 80f68d50f6b77bfea95c2c1181e2372a1b55130b | |
parent | 593d0f3a578a51775d6402064ec53dce42b4d82c (diff) | |
download | CMake-879e56f33602fc1cebaec67dd252b3eb19dc47fe.zip CMake-879e56f33602fc1cebaec67dd252b3eb19dc47fe.tar.gz CMake-879e56f33602fc1cebaec67dd252b3eb19dc47fe.tar.bz2 |
makefiles: suppress RCS and SCCS implicit rules
These are not suffix rules and are not suppressed by the empty
`.SUFFIXES` recipe. Additionally, the old `SUFFIXES =` code didn't
actually accomplish this, so remove it.
-rw-r--r-- | Source/cmLocalUnixMakefileGenerator3.cxx | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx index dbdde48..1420f7c 100644 --- a/Source/cmLocalUnixMakefileGenerator3.cxx +++ b/Source/cmLocalUnixMakefileGenerator3.cxx @@ -683,9 +683,15 @@ void cmLocalUnixMakefileGenerator3::WriteSpecialTargetsTop( if (!this->IsNMake() && !this->IsWatcomWMake() && !this->BorlandMakeCurlyHack) { // turn off RCS and SCCS automatic stuff from gmake - makefileStream - << "# Remove some rules from gmake that .SUFFIXES does not remove.\n" - << "SUFFIXES =\n\n"; + constexpr const char* vcs_rules[] = { + "%,v", "RCS/%", "RCS/%,v", "SCCS/s.%", "s.%", + }; + for (auto vcs_rule : vcs_rules) { + std::vector<std::string> vcs_depend; + vcs_depend.emplace_back(vcs_rule); + this->WriteMakeRule(makefileStream, "Disable VCS-based implicit rules.", + "%", vcs_depend, no_commands, false); + } } // Add a fake suffix to keep HP happy. Must be max 32 chars for SGI make. std::vector<std::string> depends; |