diff options
author | Brad King <brad.king@kitware.com> | 2019-09-30 13:34:57 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2019-09-30 13:34:57 (GMT) |
commit | dce58afd30b781bd99a1af5c6860583577d58a1f (patch) | |
tree | 7bcd7f200b957f10648dc34e722f1cfa56e0884a /Source/cmGlobalUnixMakefileGenerator3.cxx | |
parent | c88cf48bbe775c45c36c23b990c89d85b7b9a220 (diff) | |
parent | 013d7dd48420b7040355066724ede9eb7050c94a (diff) | |
download | CMake-dce58afd30b781bd99a1af5c6860583577d58a1f.zip CMake-dce58afd30b781bd99a1af5c6860583577d58a1f.tar.gz CMake-dce58afd30b781bd99a1af5c6860583577d58a1f.tar.bz2 |
Merge branch 'backport-3.15-fix-EXCLUDE_FROM_ALL-subdir-all'
Resolve conflicts with changes since the 3.15 series:
* Convert `cmSystemTools::IsOn` => `cmIsOn`.
* Move one "EXCLUDE_FROM_ALL" target property logic fix to
its new location in `cmMakefile::AddNewUtilityTarget`.
Diffstat (limited to 'Source/cmGlobalUnixMakefileGenerator3.cxx')
-rw-r--r-- | Source/cmGlobalUnixMakefileGenerator3.cxx | 31 |
1 files changed, 25 insertions, 6 deletions
diff --git a/Source/cmGlobalUnixMakefileGenerator3.cxx b/Source/cmGlobalUnixMakefileGenerator3.cxx index 0b211b8..4ce3d5e 100644 --- a/Source/cmGlobalUnixMakefileGenerator3.cxx +++ b/Source/cmGlobalUnixMakefileGenerator3.cxx @@ -230,6 +230,14 @@ void cmGlobalUnixMakefileGenerator3::WriteMainMakefile2() depends.push_back(this->EmptyRuleHackDepends); } + // Write and empty all: + lg->WriteMakeRule(makefileStream, "The main recursive all target", "all", + depends, no_commands, true); + + // Write an empty preinstall: + lg->WriteMakeRule(makefileStream, "The main recursive preinstall target", + "preinstall", depends, no_commands, true); + // Write out the "special" stuff lg->WriteSpecialTargetsTop(makefileStream); @@ -460,8 +468,13 @@ void cmGlobalUnixMakefileGenerator3::WriteDirectoryRules2( ruleFileStream << "\n\n"; } - // Write directory-level rules for "all". - this->WriteDirectoryRule2(ruleFileStream, lg, "all", true, false); + if (!lg->IsRootMakefile()) { + // Write directory-level rules for "all". + this->WriteDirectoryRule2(ruleFileStream, lg, "all", true, false); + + // Write directory-level rules for "preinstall". + this->WriteDirectoryRule2(ruleFileStream, lg, "preinstall", true, true); + } // Write directory-level rules for "clean". { @@ -469,9 +482,6 @@ void cmGlobalUnixMakefileGenerator3::WriteDirectoryRules2( lg->AppendDirectoryCleanCommand(cmds); this->WriteDirectoryRule2(ruleFileStream, lg, "clean", false, false, cmds); } - - // Write directory-level rules for "preinstall". - this->WriteDirectoryRule2(ruleFileStream, lg, "preinstall", true, true); } std::vector<cmGlobalGenerator::GeneratedMakeCommand> @@ -685,6 +695,15 @@ void cmGlobalUnixMakefileGenerator3::WriteConvenienceRules2( lg->WriteMakeRule(ruleFileStream, "All Build rule for target.", localName, depends, commands, true); + // add the all/all dependency + if (!this->IsExcluded(this->LocalGenerators[0], gtarget)) { + depends.clear(); + depends.push_back(localName); + commands.clear(); + lg->WriteMakeRule(ruleFileStream, "Include target in all.", "all", + depends, commands, true); + } + // Write the rule. commands.clear(); @@ -739,7 +758,7 @@ void cmGlobalUnixMakefileGenerator3::WriteConvenienceRules2( "Pre-install relink rule for target.", localName, depends, commands, true); - if (!this->IsExcluded(gtarget)) { + if (!this->IsExcluded(this->LocalGenerators[0], gtarget)) { depends.clear(); depends.push_back(localName); commands.clear(); |