diff options
author | Ken Martin <ken.martin@kitware.com> | 2005-05-16 14:53:02 (GMT) |
---|---|---|
committer | Ken Martin <ken.martin@kitware.com> | 2005-05-16 14:53:02 (GMT) |
commit | 1c95c08ccf6ddc33cf009fd54d0806ec007cd5fa (patch) | |
tree | 578bf3dc76f82fcd801d999e38e306b81f35a1f7 /Source/cmLocalUnixMakefileGenerator3.cxx | |
parent | c2c0956c43c3cdcd1e3cb5db70560ecd5886aa98 (diff) | |
download | CMake-1c95c08ccf6ddc33cf009fd54d0806ec007cd5fa.zip CMake-1c95c08ccf6ddc33cf009fd54d0806ec007cd5fa.tar.gz CMake-1c95c08ccf6ddc33cf009fd54d0806ec007cd5fa.tar.bz2 |
ENH: some updates to the provides requires code
Diffstat (limited to 'Source/cmLocalUnixMakefileGenerator3.cxx')
-rw-r--r-- | Source/cmLocalUnixMakefileGenerator3.cxx | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx index 9d275fe..9f9e47f 100644 --- a/Source/cmLocalUnixMakefileGenerator3.cxx +++ b/Source/cmLocalUnixMakefileGenerator3.cxx @@ -625,15 +625,20 @@ cmLocalUnixMakefileGenerator3 // If the language needs provides-requires mode, create the // corresponding targets. + std::string objectRequires = obj; + objectRequires += ".requires"; + std::vector<std::string> no_commands; + + // always provide an empty requires target + this->WriteMakeRule(ruleFileStream, 0, + objectRequires.c_str(), no_commands, no_commands); + if(strcmp(lang, "Fortran") == 0) { - std::string objectRequires = obj; std::string objectProvides = obj; - objectRequires += ".requires"; objectProvides += ".provides"; { // Add the provides target to build the object file. - std::vector<std::string> no_commands; std::vector<std::string> p_depends; p_depends.push_back(obj); this->WriteMakeRule(ruleFileStream, 0, @@ -642,7 +647,18 @@ cmLocalUnixMakefileGenerator3 // Add this to the set of provides-requires objects on the target. provides_requires.push_back(objectRequires); + { + // Add the requires.build target to recursively build the provides + // target after needed information is up to date. + std::vector<std::string> no_depends; + std::vector<std::string> r_commands; + r_commands.push_back(this->GetRecursiveMakeCall("Makefile",objectProvides.c_str())); + objectRequires += ".build"; + this->WriteMakeRule(ruleFileStream, 0, + objectRequires.c_str(), no_depends, r_commands); } + } + } //---------------------------------------------------------------------------- |