diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2003-10-28 16:06:06 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2003-10-28 16:06:06 (GMT) |
commit | 3e2c1f347701155f2713ab144f3c7b3cf00d8aca (patch) | |
tree | 8d8b7b5a6cb31a3f0b3255c37769e274ea0e9a4f /Source/cmLocalUnixMakefileGenerator.cxx | |
parent | 032883cc348fad280ada33bcaa4598e0fcea7dd3 (diff) | |
download | CMake-3e2c1f347701155f2713ab144f3c7b3cf00d8aca.zip CMake-3e2c1f347701155f2713ab144f3c7b3cf00d8aca.tar.gz CMake-3e2c1f347701155f2713ab144f3c7b3cf00d8aca.tar.bz2 |
BUG: fix for bug 303 pass makeflags to sub makes
Diffstat (limited to 'Source/cmLocalUnixMakefileGenerator.cxx')
-rw-r--r-- | Source/cmLocalUnixMakefileGenerator.cxx | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/Source/cmLocalUnixMakefileGenerator.cxx b/Source/cmLocalUnixMakefileGenerator.cxx index b596b80..f444c41 100644 --- a/Source/cmLocalUnixMakefileGenerator.cxx +++ b/Source/cmLocalUnixMakefileGenerator.cxx @@ -31,6 +31,7 @@ cmLocalUnixMakefileGenerator::cmLocalUnixMakefileGenerator() m_IncludeDirective = "include"; m_MakefileVariableSize = 0; m_IgnoreLibPrefix = false; + m_PassMakeflags = false; } cmLocalUnixMakefileGenerator::~cmLocalUnixMakefileGenerator() @@ -232,6 +233,14 @@ void cmLocalUnixMakefileGenerator::OutputMakefile(const char* file, std::string checkCache = m_Makefile->GetHomeOutputDirectory(); checkCache += "/cmake.check_cache"; checkCache = cmSystemTools::ConvertToOutputPath(checkCache.c_str()); + // most unix makes will pass the command line flags to make down + // to sub invoked makes via an environment variable. However, some + // makes do not support that, so you have to pass the flags explicitly + const char* allRule = "$(MAKE) $(MAKESILENT) all"; + if(m_PassMakeflags) + { + allRule = "$(MAKE) $(MAKESILENT) -$(MAKEFLAGS) all"; + } // Set up the default target as the VERY first target, so that make with no arguments will run it this-> OutputMakeRule(fout, @@ -241,8 +250,8 @@ void cmLocalUnixMakefileGenerator::OutputMakefile(const char* file, "$(MAKE) $(MAKESILENT) cmake.depends", "$(MAKE) $(MAKESILENT) cmake.check_depends", "$(MAKE) $(MAKESILENT) -f cmake.check_depends", - "$(MAKE) $(MAKESILENT) all"); - + allRule); + // Generation of SILENT target must be after default_target. if(!m_Makefile->IsOn("CMAKE_VERBOSE_MAKEFILE")) { |