summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalUnixMakefileGenerator3.cxx
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2006-01-02 17:36:54 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2006-01-02 17:36:54 (GMT)
commit61e056e2dc20af29d8a58e5fa9e7ea6c2b67c747 (patch)
tree1db8d3308c22842b6e0ba2353967ba46e3430ce2 /Source/cmLocalUnixMakefileGenerator3.cxx
parent1d9ef3f8b59cd5dee9932cb09060d1b40faa648c (diff)
downloadCMake-61e056e2dc20af29d8a58e5fa9e7ea6c2b67c747.zip
CMake-61e056e2dc20af29d8a58e5fa9e7ea6c2b67c747.tar.gz
CMake-61e056e2dc20af29d8a58e5fa9e7ea6c2b67c747.tar.bz2
BUG: fix for bug 2533, make foo/foo.o now works and .o files are in the help
Diffstat (limited to 'Source/cmLocalUnixMakefileGenerator3.cxx')
-rw-r--r--Source/cmLocalUnixMakefileGenerator3.cxx20
1 files changed, 13 insertions, 7 deletions
diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx
index e387465..7eb32d2 100644
--- a/Source/cmLocalUnixMakefileGenerator3.cxx
+++ b/Source/cmLocalUnixMakefileGenerator3.cxx
@@ -721,8 +721,8 @@ cmLocalUnixMakefileGenerator3
}
// Get the full path name of the object file.
- std::string obj = this->GetObjectFileName(target, source);
-
+ std::string objNoTargetDir;
+ std::string obj = this->GetObjectFileName(target, source, &objNoTargetDir);
// Avoid generating duplicate rules.
if(m_ObjectFiles.find(obj) == m_ObjectFiles.end())
{
@@ -749,7 +749,6 @@ cmLocalUnixMakefileGenerator3
objects.push_back(obj);
std::string relativeObj = this->GetHomeRelativeOutputPath();
relativeObj += obj;
-
// we compute some depends when writing the depend.make that we will also
// use in the build.make, same with depMakeFile
std::vector<std::string> depends;
@@ -761,9 +760,12 @@ cmLocalUnixMakefileGenerator3
// The object file should be checked for dependency integrity.
m_CheckDependFiles[target.GetName()][lang].insert(&source);
-
// add this to the list of objects for this local generator
- m_LocalObjectFiles[cmSystemTools::GetFilenameName(obj)].push_back(&target);
+ if(cmSystemTools::FileIsFullPath(objNoTargetDir.c_str()))
+ {
+ objNoTargetDir = cmSystemTools::GetFilenameName(objNoTargetDir);
+ }
+ m_LocalObjectFiles[objNoTargetDir].push_back(&target);
}
//----------------------------------------------------------------------------
@@ -2124,7 +2126,8 @@ cmLocalUnixMakefileGenerator3
std::string
cmLocalUnixMakefileGenerator3
::GetObjectFileName(cmTarget& target,
- const cmSourceFile& source)
+ const cmSourceFile& source,
+ std::string* nameWithoutTargetDir)
{
// If the full path to the source file includes this directory,
// we want to use the relative path for the filename of the
@@ -2152,11 +2155,14 @@ cmLocalUnixMakefileGenerator3
// Convert to a safe name.
objectName = this->CreateSafeUniqueObjectFileName(objectName.c_str());
-
// Prepend the target directory.
std::string obj = this->GetTargetDirectory(target);
obj += "/";
obj += objectName;
+ if(nameWithoutTargetDir)
+ {
+ *nameWithoutTargetDir = objectName;
+ }
return obj;
}