diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2003-12-24 18:17:17 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2003-12-24 18:17:17 (GMT) |
commit | fbd0bafca7ed0010ef6bd8c10c1fb97ee5db95bd (patch) | |
tree | cb8a7f92999033f9dd6958c1ce153ad65478aef0 | |
parent | f3c42f593e6a4d084b6ac1bd70fa597f923a2cbc (diff) | |
download | CMake-fbd0bafca7ed0010ef6bd8c10c1fb97ee5db95bd.zip CMake-fbd0bafca7ed0010ef6bd8c10c1fb97ee5db95bd.tar.gz CMake-fbd0bafca7ed0010ef6bd8c10c1fb97ee5db95bd.tar.bz2 |
ENH: use cd pwd trick for path for libnames
-rw-r--r-- | Source/cmLocalUnixMakefileGenerator.cxx | 32 |
1 files changed, 23 insertions, 9 deletions
diff --git a/Source/cmLocalUnixMakefileGenerator.cxx b/Source/cmLocalUnixMakefileGenerator.cxx index 7493a06..dbb132e 100644 --- a/Source/cmLocalUnixMakefileGenerator.cxx +++ b/Source/cmLocalUnixMakefileGenerator.cxx @@ -1072,16 +1072,27 @@ void cmLocalUnixMakefileGenerator::OutputLibraryRule(std::ostream& fout, targetName, targetNameSO, targetNameReal, targetNameBase); + std::string outpath; + std::string outdir = this->ConvertToRelativeOutputPath(m_LibraryOutputPath.c_str()); + if(!m_WindowsShell && outdir.size()) + { + outpath = "\"`cd "; + } + outpath += outdir; + if(!m_WindowsShell && outdir.size()) + { + outpath += ";pwd`\"/"; + } + if(outdir.size() == 0 && !m_WindowsShell) + { + outpath = "\"`pwd`\"/"; + } // The full path versions of the names. - std::string targetFullPath = m_LibraryOutputPath + targetName; - std::string targetFullPathSO = m_LibraryOutputPath + targetNameSO; - std::string targetFullPathReal = m_LibraryOutputPath + targetNameReal; - std::string targetFullPathBase = m_LibraryOutputPath + targetNameBase; - targetFullPath = this->ConvertToRelativeOutputPath(targetFullPath.c_str()); - targetFullPathSO = this->ConvertToRelativeOutputPath(targetFullPathSO.c_str()); - targetFullPathReal = this->ConvertToRelativeOutputPath(targetFullPathReal.c_str()); - targetFullPathBase = this->ConvertToRelativeOutputPath(targetFullPathBase.c_str()); - + std::string targetFullPath = outpath + targetName; + std::string targetFullPathSO = outpath + targetNameSO; + std::string targetFullPathReal = outpath + targetNameReal; + std::string targetFullPathBase = outpath + targetNameBase; + // get the objects that are used to link this library std::string objs = "$(" + this->CreateMakeVariable(name, "_SRC_OBJS") + ") "; std::string objsQuoted = "$(" + this->CreateMakeVariable(name, "_SRC_OBJS_QUOTED") + ") "; @@ -1165,6 +1176,9 @@ void cmLocalUnixMakefileGenerator::OutputLibraryRule(std::ostream& fout, targetNameSO.c_str(), linkFlags); } + + targetFullPath = m_LibraryOutputPath + targetName; + targetFullPath = this->ConvertToRelativeOutputPath(targetFullPath.c_str()); this->OutputMakeRule(fout, comment, targetFullPath.c_str(), depend.c_str(), |