summaryrefslogtreecommitdiffstats
path: root/Source/cmDependsC.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2006-05-25 13:47:30 (GMT)
committerBrad King <brad.king@kitware.com>2006-05-25 13:47:30 (GMT)
commitec2104cd31af3c533838fce05534d37d762028d6 (patch)
treeed573ad662fca47d67cff8a627d8d3c25c5ec7e0 /Source/cmDependsC.cxx
parent12456165f13112f84ff825531b562bffd16bb403 (diff)
downloadCMake-ec2104cd31af3c533838fce05534d37d762028d6.zip
CMake-ec2104cd31af3c533838fce05534d37d762028d6.tar.gz
CMake-ec2104cd31af3c533838fce05534d37d762028d6.tar.bz2
BUG: Updated Makefile dependency scanning to provide a full local generator to the dependency scanner to do proper path conversions. This allows the rules written into the depend.make files to use the same relative path conversion as those written into the build.make files. Several previous changes added more and more information for use by the dependency scanner and it was converging to having the full local generator anyway.
Diffstat (limited to 'Source/cmDependsC.cxx')
-rw-r--r--Source/cmDependsC.cxx17
1 files changed, 12 insertions, 5 deletions
diff --git a/Source/cmDependsC.cxx b/Source/cmDependsC.cxx
index ad1d021..1a74f5c 100644
--- a/Source/cmDependsC.cxx
+++ b/Source/cmDependsC.cxx
@@ -16,8 +16,9 @@
=========================================================================*/
#include "cmDependsC.h"
-#include "cmSystemTools.h"
#include "cmFileTimeComparison.h"
+#include "cmLocalGenerator.h"
+#include "cmSystemTools.h"
#include <ctype.h> // isspace
@@ -194,13 +195,18 @@ bool cmDependsC::WriteDependencies(const char *src, const char *obj,
first = false;
}
- // Write the dependencies to the output stream.
+ // Write the dependencies to the output stream. Makefile rules
+ // written by the original local generator for this directory
+ // convert the dependencies to paths relative to the home output
+ // directory. We must do the same here.
internalDepends << obj << std::endl;
for(std::set<cmStdString>::iterator i=dependencies.begin();
i != dependencies.end(); ++i)
{
makeDepends << obj << ": "
- << cmSystemTools::ConvertToOutputPath(i->c_str()).c_str()
+ << this->LocalGenerator->Convert(i->c_str(),
+ cmLocalGenerator::HOME_OUTPUT,
+ cmLocalGenerator::MAKEFILE)
<< std::endl;
internalDepends << " " << i->c_str() << std::endl;
}
@@ -370,8 +376,9 @@ bool cmDependsC::FileExistsOrIsGenerated(const std::string& fname,
// Note that CMAKE_GENERATED_FILES is written with a conversion
// relative to the home output directory.
std::string rname =
- cmSystemTools::RelativePath(this->HomeOutputDirectory.c_str(),
- fname.c_str());
+ this->LocalGenerator->Convert(fname.c_str(),
+ cmLocalGenerator::HOME_OUTPUT,
+ cmLocalGenerator::UNCHANGED);
if(this->FileIsGenerated(rname, scanned, dependencies))
{
return true;