Permalink
Browse files

Use full-path recursive call in Makefiles

  • Loading branch information...
1 parent 6d7e4d4 commit b439cd2235c98860198e65c612871deb7a13c7a0 @catap committed Apr 6, 2011
Showing with 7 additions and 0 deletions.
  1. +2 −0 Source/cmDocumentVariables.cxx
  2. +5 −0 Source/cmLocalUnixMakefileGenerator3.cxx
@@ -1549,4 +1549,6 @@ void cmDocumentVariables::DefineVariables(cmake* cm)
cmProperty::VARIABLE,0,0);
cm->DefineProperty("CMAKE_MAKE_INCLUDE_FROM_ROOT",
cmProperty::VARIABLE,0,0);
+ cm->DefineProperty("CMAKE_MAKE_RECURSIVE_CALL_FROM_ROOT",
+ cmProperty::VARIABLE,0,0);
}
@@ -2046,9 +2046,14 @@ std::string
cmLocalUnixMakefileGenerator3
::GetRecursiveMakeCall(const char *makefile, const char* tgt)
{
+ const char* root =
+ (this->Makefile->IsOn("CMAKE_MAKE_RECURSIVE_CALL_FROM_ROOT")?
+ "$(CMAKE_BINARY_DIR)/" : "");
+
// Call make on the given file.
std::string cmd;
cmd += "$(MAKE) -f ";
+ cmd += root;
cmd += this->Convert(makefile,NONE,SHELL);
cmd += " ";

1 comment on commit b439cd2

Interesting. Can you explain why you need this in more detail?

Please sign in to comment.