summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2010-06-15 18:03:26 (GMT)
committerBrad King <brad.king@kitware.com>2010-06-15 18:03:26 (GMT)
commit5444bd6ca39425f092e3e6b0f19cd70869742091 (patch)
tree97fb3d95d355386cae207241ec086d6f44696299
parentc9f8bbf22683199018ecd2caf980bc73d4900435 (diff)
parentc592df8377446224f0aa24568ada2aec058dd033 (diff)
downloadCMake-5444bd6ca39425f092e3e6b0f19cd70869742091.zip
CMake-5444bd6ca39425f092e3e6b0f19cd70869742091.tar.gz
CMake-5444bd6ca39425f092e3e6b0f19cd70869742091.tar.bz2
Merge branch 'tru64-make-includes'
-rw-r--r--Modules/Platform/OSF1.cmake1
-rw-r--r--Source/cmDocumentVariables.cxx2
-rw-r--r--Source/cmMakefileTargetGenerator.cxx9
3 files changed, 9 insertions, 3 deletions
diff --git a/Modules/Platform/OSF1.cmake b/Modules/Platform/OSF1.cmake
index 652bed4..076410a 100644
--- a/Modules/Platform/OSF1.cmake
+++ b/Modules/Platform/OSF1.cmake
@@ -25,6 +25,7 @@ IF(CMAKE_SYSTEM MATCHES "OSF1-V.*")
SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP ":")
ENDIF(CMAKE_SYSTEM MATCHES "OSF1-V.*")
+SET(CMAKE_MAKE_INCLUDE_FROM_ROOT 1) # include $(CMAKE_BINARY_DIR)/...
IF(CMAKE_COMPILER_IS_GNUCXX)
# include the gcc flags
diff --git a/Source/cmDocumentVariables.cxx b/Source/cmDocumentVariables.cxx
index c7848b7..2ed959f 100644
--- a/Source/cmDocumentVariables.cxx
+++ b/Source/cmDocumentVariables.cxx
@@ -1400,4 +1400,6 @@ void cmDocumentVariables::DefineVariables(cmake* cm)
cmProperty::VARIABLE,0,0);
cm->DefineProperty("CMAKE_LINK_DEPENDENT_LIBRARY_DIRS",
cmProperty::VARIABLE,0,0);
+ cm->DefineProperty("CMAKE_MAKE_INCLUDE_FROM_ROOT",
+ cmProperty::VARIABLE,0,0);
}
diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx
index 4c4dbc1..d5d6585 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)