diff options
author | Brad King <brad.king@kitware.com> | 2005-04-07 19:09:13 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2005-04-07 19:09:13 (GMT) |
commit | 5fb834217794525925a822d3cd7cc2e372555a75 (patch) | |
tree | dd8b139644289ecb39142bd9bebf58e652f5fa5c /Source/cmLocalUnixMakefileGenerator2.cxx | |
parent | 738bbc767bde346cf5d8e85a40adb340d3a7ed21 (diff) | |
download | CMake-5fb834217794525925a822d3cd7cc2e372555a75.zip CMake-5fb834217794525925a822d3cd7cc2e372555a75.tar.gz CMake-5fb834217794525925a822d3cd7cc2e372555a75.tar.bz2 |
BUG: Avoid converting the subdirectory name to a relative path twice.
Diffstat (limited to 'Source/cmLocalUnixMakefileGenerator2.cxx')
-rw-r--r-- | Source/cmLocalUnixMakefileGenerator2.cxx | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/Source/cmLocalUnixMakefileGenerator2.cxx b/Source/cmLocalUnixMakefileGenerator2.cxx index 6b7f547..bd1c080 100644 --- a/Source/cmLocalUnixMakefileGenerator2.cxx +++ b/Source/cmLocalUnixMakefileGenerator2.cxx @@ -1313,19 +1313,18 @@ cmLocalUnixMakefileGenerator2 { if(!(*i)->GetExcludeAll()) { - // Construct the name of the subdirectory relative to this - // directory. - std::string subdir = - this->ConvertToRelativePath((*i)->GetMakefile()->GetStartOutputDirectory()); - // Add the subdirectory rule either for pre-order or post-order. if((*i)->GetMakefile()->GetPreOrder()) { - this->WriteSubdirRule(makefileStream, pass, subdir.c_str(), lastPre); + this->WriteSubdirRule(makefileStream, pass, + (*i)->GetMakefile()->GetStartOutputDirectory(), + lastPre); } else { - this->WriteSubdirRule(makefileStream, pass, subdir.c_str(), lastPost); + this->WriteSubdirRule(makefileStream, pass, + (*i)->GetMakefile()->GetStartOutputDirectory(), + lastPost); } } } @@ -2230,10 +2229,13 @@ std::string cmLocalUnixMakefileGenerator2 ::GetSubdirTargetName(const char* pass, const char* subdir) { + // Convert the subdirectory name to a relative path to keep it short. + std::string reldir = this->ConvertToRelativePath(subdir); + // Convert the subdirectory name to a valid make target name. std::string s = pass; s += "_"; - s += subdir; + s += reldir; // Replace "../" with 3 underscores. This allows one .. at the beginning. size_t pos = s.find("../"); |