From 9c4997bf06361b05ddad6d23388086b012d381fb Mon Sep 17 00:00:00 2001 From: Brad King Date: Thu, 24 Feb 2005 12:44:56 -0500 Subject: BUG: Avoid putting a leading ./ on the dependency names. --- Source/cmDependsC.cxx | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/Source/cmDependsC.cxx b/Source/cmDependsC.cxx index 94ef801..d77d842 100644 --- a/Source/cmDependsC.cxx +++ b/Source/cmDependsC.cxx @@ -90,9 +90,20 @@ bool cmDependsC::WriteDependencies(std::ostream& os) for(std::vector::const_iterator i = m_IncludePath->begin(); i != m_IncludePath->end(); ++i) { + // Construct the name of the file as if it were in the current + // include directory. Avoid using a leading "./". std::string temp = *i; - temp += "/"; + if(temp == ".") + { + temp = ""; + } + else + { + temp += "/"; + } temp += fname; + + // Look for the file in this location. if(cmSystemTools::FileExists(temp.c_str())) { fullName = temp; -- cgit v0.12