diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2004-12-06 17:38:04 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2004-12-06 17:38:04 (GMT) |
commit | 2615e6f0a9ce35198d54922aedc1ab5b7f1a68c3 (patch) | |
tree | d69f29f6b80c576c270383404834bd14a27b7a1d /Source/cmLocalUnixMakefileGenerator.cxx | |
parent | e3bb6683dedc2e896689a2b202a5c1ee6e373e18 (diff) | |
download | CMake-2615e6f0a9ce35198d54922aedc1ab5b7f1a68c3.zip CMake-2615e6f0a9ce35198d54922aedc1ab5b7f1a68c3.tar.gz CMake-2615e6f0a9ce35198d54922aedc1ab5b7f1a68c3.tar.bz2 |
BUG: fix for bug 1396, object files could not be used as sources any more
Diffstat (limited to 'Source/cmLocalUnixMakefileGenerator.cxx')
-rw-r--r-- | Source/cmLocalUnixMakefileGenerator.cxx | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/Source/cmLocalUnixMakefileGenerator.cxx b/Source/cmLocalUnixMakefileGenerator.cxx index 5b34a48..850f964 100644 --- a/Source/cmLocalUnixMakefileGenerator.cxx +++ b/Source/cmLocalUnixMakefileGenerator.cxx @@ -465,6 +465,7 @@ void cmLocalUnixMakefileGenerator::OutputTargetRules(std::ostream& fout) } } fout << "\n\n"; + std::string outputName; // get the classes from the source lists then add them to the groups for(cmTargets::const_iterator l = tgts.begin(); l != tgts.end(); l++) @@ -524,7 +525,17 @@ void cmLocalUnixMakefileGenerator::OutputTargetRules(std::ostream& fout) { std::string ofname = (*i)->GetSourceName() + outExt; ofname = this->CreateSafeUniqueObjectFileName(ofname.c_str()); - fout << "\\\n\"" << this->ConvertToMakeTarget(ConvertToRelativeOutputPath(ofname.c_str()).c_str()) << "\" "; + outputName = this->ConvertToMakeTarget(ConvertToRelativeOutputPath(ofname.c_str()).c_str()); + fout << "\\\n"; + // if it already is double quoted because of spaces don't do it again. + if(outputName.size() && outputName[0] != '\"') + { + fout << "\"" << outputName << "\" "; + } + else + { + fout << outputName << " "; + } } } } @@ -541,7 +552,18 @@ void cmLocalUnixMakefileGenerator::OutputTargetRules(std::ostream& fout) (*i)->GetSourceExtension().c_str()); if(outExt.size() && (*i)->GetPropertyAsBool("EXTERNAL_OBJECT") ) { - fout << "\\\n\"" << this->ConvertToMakeTarget(ConvertToRelativeOutputPath((*i)->GetFullPath().c_str()).c_str()) << "\" "; + outputName = + this->ConvertToMakeTarget(ConvertToRelativeOutputPath((*i)->GetFullPath().c_str()).c_str()); + fout << "\\\n"; + // if it already is double quoted because of spaces don't do it again. + if(outputName.size() && outputName[0] != '\"') + { + fout << "\"" << outputName << "\" "; + } + else + { + fout << outputName << " "; + } } } } |