diff --git a/Source/cmLocalUnixMakefileGenerator.cxx b/Source/cmLocalUnixMakefileGenerator.cxx index 0a8a6ac3f..72a35b7f7 100644 --- a/Source/cmLocalUnixMakefileGenerator.cxx +++ b/Source/cmLocalUnixMakefileGenerator.cxx @@ -41,6 +41,25 @@ cmLocalUnixMakefileGenerator::~cmLocalUnixMakefileGenerator() void cmLocalUnixMakefileGenerator::Generate(bool fromTheTop) +{ + this->ConfigureOutputPaths(); + if (!fromTheTop) + { + // Generate depends + cmMakeDepend md; + md.SetMakefile(m_Makefile); + md.GenerateMakefileDependencies(); + this->ProcessDepends(md); + } + // output the makefile fragment + std::string dest = m_Makefile->GetStartOutputDirectory(); + dest += "/Makefile"; + this->OutputMakefile(dest.c_str(), !fromTheTop); +} + +//---------------------------------------------------------------------------- +void +cmLocalUnixMakefileGenerator::ConfigureOutputPaths() { m_UseRelativePaths = m_Makefile->IsOn("CMAKE_USE_RELATIVE_PATHS"); // suppoirt override in output directories @@ -81,19 +100,6 @@ void cmLocalUnixMakefileGenerator::Generate(bool fromTheTop) m_Makefile->AddLinkDirectory(m_ExecutableOutputPath.c_str()); } } - - if (!fromTheTop) - { - // Generate depends - cmMakeDepend md; - md.SetMakefile(m_Makefile); - md.GenerateMakefileDependencies(); - this->ProcessDepends(md); - } - // output the makefile fragment - std::string dest = m_Makefile->GetStartOutputDirectory(); - dest += "/Makefile"; - this->OutputMakefile(dest.c_str(), !fromTheTop); } void diff --git a/Source/cmLocalUnixMakefileGenerator.h b/Source/cmLocalUnixMakefileGenerator.h index 020ea5719..4a854cad6 100644 --- a/Source/cmLocalUnixMakefileGenerator.h +++ b/Source/cmLocalUnixMakefileGenerator.h @@ -88,7 +88,8 @@ public: void SetPassMakeflags(bool s){m_PassMakeflags = s;} protected: - + + void ConfigureOutputPaths(); void AddDependenciesToSourceFile(cmDependInformation const*info, cmSourceFile *i, std::set *visited);