summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefileTargetGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2010-06-10 15:15:31 (GMT)
committerBrad King <brad.king@kitware.com>2010-06-14 17:06:39 (GMT)
commitc592df8377446224f0aa24568ada2aec058dd033 (patch)
treeda5ca8f881d5d37e677da8f741502eea04dcaa7f /Source/cmMakefileTargetGenerator.cxx
parent3f929475246a3d89ca5d4c5db301d1c4705d0d69 (diff)
downloadCMake-c592df8377446224f0aa24568ada2aec058dd033.zip
CMake-c592df8377446224f0aa24568ada2aec058dd033.tar.gz
CMake-c592df8377446224f0aa24568ada2aec058dd033.tar.bz2
Tru64: Use full-path include directives in Makefiles (#10569)
Tru64's make(1) resolves relative paths in "include" directives with respect to the includer. This is inconsistent with all other known make tools. Note that this make tool treats the path literally so we cannot use our standard FULL path code which escapes spaces. Instead qualify the paths with $(CMAKE_BINARY_DIR) to avoid the problem.
Diffstat (limited to 'Source/cmMakefileTargetGenerator.cxx')
-rw-r--r--Source/cmMakefileTargetGenerator.cxx9
1 files changed, 6 insertions, 3 deletions
diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx
index ac727ac..e1f2f8b 100644
--- a/Source/cmMakefileTargetGenerator.cxx
+++ b/Source/cmMakefileTargetGenerator.cxx
@@ -189,12 +189,15 @@ void cmMakefileTargetGenerator::WriteTargetBuildRules()
//----------------------------------------------------------------------------
void cmMakefileTargetGenerator::WriteCommonCodeRules()
{
+ const char* root = (this->Makefile->IsOn("CMAKE_MAKE_INCLUDE_FROM_ROOT")?
+ "$(CMAKE_BINARY_DIR)/" : "");
+
// Include the dependencies for the target.
std::string dependFileNameFull = this->TargetBuildDirectoryFull;
dependFileNameFull += "/depend.make";
*this->BuildFileStream
<< "# Include any dependencies generated for this target.\n"
- << this->LocalGenerator->IncludeDirective << " "
+ << this->LocalGenerator->IncludeDirective << " " << root
<< this->Convert(dependFileNameFull.c_str(),
cmLocalGenerator::HOME_OUTPUT,
cmLocalGenerator::MAKEFILE)
@@ -205,7 +208,7 @@ void cmMakefileTargetGenerator::WriteCommonCodeRules()
// Include the progress variables for the target.
*this->BuildFileStream
<< "# Include the progress variables for this target.\n"
- << this->LocalGenerator->IncludeDirective << " "
+ << this->LocalGenerator->IncludeDirective << " " << root
<< this->Convert(this->ProgressFileNameFull.c_str(),
cmLocalGenerator::HOME_OUTPUT,
cmLocalGenerator::MAKEFILE)
@@ -238,7 +241,7 @@ void cmMakefileTargetGenerator::WriteCommonCodeRules()
// Include the flags for the target.
*this->BuildFileStream
<< "# Include the compile flags for this target's objects.\n"
- << this->LocalGenerator->IncludeDirective << " "
+ << this->LocalGenerator->IncludeDirective << " " << root
<< this->Convert(this->FlagFileNameFull.c_str(),
cmLocalGenerator::HOME_OUTPUT,
cmLocalGenerator::MAKEFILE)