diff options
-rw-r--r-- | Source/cmMakefileExecutableTargetGenerator.cxx | 2 | ||||
-rw-r--r-- | Source/cmMakefileLibraryTargetGenerator.cxx | 2 | ||||
-rw-r--r-- | Source/cmMakefileTargetGenerator.cxx | 5 | ||||
-rw-r--r-- | Source/cmMakefileTargetGenerator.h | 3 |
4 files changed, 8 insertions, 4 deletions
diff --git a/Source/cmMakefileExecutableTargetGenerator.cxx b/Source/cmMakefileExecutableTargetGenerator.cxx index c1c3b63..9e8d42d 100644 --- a/Source/cmMakefileExecutableTargetGenerator.cxx +++ b/Source/cmMakefileExecutableTargetGenerator.cxx @@ -405,7 +405,7 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink) { // Use a link script. const char* name = (relink? "relink.txt" : "link.txt"); - this->CreateLinkScript(name, real_link_commands, commands1); + this->CreateLinkScript(name, real_link_commands, commands1, depends); } else { diff --git a/Source/cmMakefileLibraryTargetGenerator.cxx b/Source/cmMakefileLibraryTargetGenerator.cxx index bb68d36..dd4c9eb 100644 --- a/Source/cmMakefileLibraryTargetGenerator.cxx +++ b/Source/cmMakefileLibraryTargetGenerator.cxx @@ -788,7 +788,7 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules { // Use a link script. const char* name = (relink? "relink.txt" : "link.txt"); - this->CreateLinkScript(name, real_link_commands, commands1); + this->CreateLinkScript(name, real_link_commands, commands1, depends); } else { diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx index 135b199..08cf6df 100644 --- a/Source/cmMakefileTargetGenerator.cxx +++ b/Source/cmMakefileTargetGenerator.cxx @@ -1563,13 +1563,15 @@ void cmMakefileTargetGenerator ::CreateLinkScript(const char* name, std::vector<std::string> const& link_commands, - std::vector<std::string>& makefile_commands) + std::vector<std::string>& makefile_commands, + std::vector<std::string>& makefile_depends) { // Create the link script file. std::string linkScriptName = this->TargetBuildDirectoryFull; linkScriptName += "/"; linkScriptName += name; cmGeneratedFileStream linkScriptStream(linkScriptName.c_str()); + linkScriptStream.SetCopyIfDifferent(true); for(std::vector<std::string>::const_iterator cmd = link_commands.begin(); cmd != link_commands.end(); ++cmd) { @@ -1588,6 +1590,7 @@ cmMakefileTargetGenerator cmLocalGenerator::SHELL); link_command += " --verbose=$(VERBOSE)"; makefile_commands.push_back(link_command); + makefile_depends.push_back(linkScriptName); } //---------------------------------------------------------------------------- diff --git a/Source/cmMakefileTargetGenerator.h b/Source/cmMakefileTargetGenerator.h index 34a736a..1039f3d 100644 --- a/Source/cmMakefileTargetGenerator.h +++ b/Source/cmMakefileTargetGenerator.h @@ -134,7 +134,8 @@ protected: script at build time. */ void CreateLinkScript(const char* name, std::vector<std::string> const& link_commands, - std::vector<std::string>& makefile_commands); + std::vector<std::string>& makefile_commands, + std::vector<std::string>& makefile_depends); virtual void CloseFileStreams(); void RemoveForbiddenFlags(const char* flagVar, const char* linkLang, |