From 144f3670c0c9f6b8f1cca39f483bc1e0c41ff8bc Mon Sep 17 00:00:00 2001 From: Ken Martin Date: Tue, 24 May 2005 16:11:59 -0400 Subject: BUG: building libs caused all generated files to be deleted --- Source/cmLocalUnixMakefileGenerator3.cxx | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx index 11a86bb..fd9ed40 100644 --- a/Source/cmLocalUnixMakefileGenerator3.cxx +++ b/Source/cmLocalUnixMakefileGenerator3.cxx @@ -1738,6 +1738,7 @@ cmLocalUnixMakefileGenerator3 // Construct a list of files associated with this library that may // need to be cleaned. + std::vector libCleanFiles; { std::string cleanStaticName; std::string cleanSharedName; @@ -1752,27 +1753,30 @@ cmLocalUnixMakefileGenerator3 std::string cleanFullSharedName = outpath + cleanSharedName; std::string cleanFullSharedSOName = outpath + cleanSharedSOName; std::string cleanFullSharedRealName = outpath + cleanSharedRealName; - cleanFiles.push_back(cleanFullStaticName); + libCleanFiles.push_back(cleanFullStaticName); if(cleanSharedRealName != cleanStaticName) { - cleanFiles.push_back(cleanFullSharedRealName); + libCleanFiles.push_back(cleanFullSharedRealName); } if(cleanSharedSOName != cleanStaticName && cleanSharedSOName != cleanSharedRealName) { - cleanFiles.push_back(cleanFullSharedSOName); + libCleanFiles.push_back(cleanFullSharedSOName); } if(cleanSharedName != cleanStaticName && cleanSharedName != cleanSharedSOName && cleanSharedName != cleanSharedRealName) { - cleanFiles.push_back(cleanFullSharedName); + libCleanFiles.push_back(cleanFullSharedName); } } // Add a command to remove any existing files for this library. - this->AppendCleanCommand(commands, cleanFiles); + this->AppendCleanCommand(commands, libCleanFiles); + // add the libCleanFiles to to taoal cleanFiles + cleanFiles.insert(cleanFiles.end(),libCleanFiles.begin(),libCleanFiles.end()); + // Add the pre-build and pre-link rules. this->AppendCustomCommands(commands, target.GetPreBuildCommands()); this->AppendCustomCommands(commands, target.GetPreLinkCommands()); -- cgit v0.12