diff options
author | Brad King <brad.king@kitware.com> | 2003-08-05 21:39:50 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2003-08-05 21:39:50 (GMT) |
commit | df2280a7ab47018c052a61f51e270fac63c3c006 (patch) | |
tree | 15c2aa05be679cdd330609c0c434ce4b5db48f91 | |
parent | 75b3751a4f768fb7d08fc7fc61de799da137c8b5 (diff) | |
download | CMake-df2280a7ab47018c052a61f51e270fac63c3c006.zip CMake-df2280a7ab47018c052a61f51e270fac63c3c006.tar.gz CMake-df2280a7ab47018c052a61f51e270fac63c3c006.tar.bz2 |
BUG: Fixed implementation of long dependency list support. The proxy target must have a corresponding file to work correctly. Instead of using a proxy target, we now just list one line for each dependency and then print one copy of the build rule at the end.
-rw-r--r-- | Source/cmLocalUnixMakefileGenerator.cxx | 25 |
1 files changed, 7 insertions, 18 deletions
diff --git a/Source/cmLocalUnixMakefileGenerator.cxx b/Source/cmLocalUnixMakefileGenerator.cxx index 64ffeb3..a171687 100644 --- a/Source/cmLocalUnixMakefileGenerator.cxx +++ b/Source/cmLocalUnixMakefileGenerator.cxx @@ -2802,35 +2802,24 @@ void cmLocalUnixMakefileGenerator::OutputMakeRule(std::ostream& fout, replace = target; m_Makefile->ExpandVariablesInString(replace); - if(depends.size() > 1) + std::string tgt = cmSystemTools::ConvertToOutputPath(replace.c_str()); + if(depends.empty()) { - // Create a proxy target collecting all the dependencies. This - // allows for very long dependency lists. - std::string tgt = cmSystemTools::ConvertToOutputPath(replace.c_str()); - for(std::vector<std::string>::const_iterator dep = depends.begin(); - dep != depends.end(); ++dep) - { - replace = *dep; - m_Makefile->ExpandVariablesInString(replace); - fout << tgt.c_str() << ".dependency_list:: " << replace.c_str() << "\n"; - } - - // Forward dependencies through the proxy target. - fout << tgt.c_str() << ": " << tgt.c_str() << ".dependency_list\n"; + fout << tgt.c_str() << ":\n"; } else { - fout << cmSystemTools::ConvertToOutputPath(replace.c_str()) << ":"; - + // Split dependencies into multiple rule lines. This allows for + // very long dependency lists. for(std::vector<std::string>::const_iterator dep = depends.begin(); dep != depends.end(); ++dep) { replace = *dep; m_Makefile->ExpandVariablesInString(replace); - fout << " " << replace.c_str(); + fout << tgt.c_str() << ": " << replace.c_str() << "\n"; } - fout << "\n"; } + int count = 0; for (std::vector<std::string>::const_iterator i = commands.begin(); i != commands.end(); ++i) |