소스 검색

BUG: Fix preprocess and assembly rule expansion

The recent change to avoid expanding rule variables in informational and
'cd' commands broke the logical order in generation of preprocess and
assembly rules.  This corrects the order.
Brad King 17 년 전
부모
커밋
084e5a5e9e
1개의 변경된 파일12개의 추가작업 그리고 12개의 파일을 삭제
  1. 12 12
      Source/cmMakefileTargetGenerator.cxx

+ 12 - 12
Source/cmMakefileTargetGenerator.cxx

@@ -724,6 +724,12 @@ cmMakefileTargetGenerator
         std::vector<std::string> preprocessCommands;
         cmSystemTools::ExpandListArgument(preprocessRule, preprocessCommands);
 
+        std::string shellObjI =
+          this->Convert(objI.c_str(),
+                        cmLocalGenerator::NONE,
+                        cmLocalGenerator::SHELL).c_str();
+        vars.PreprocessedSource = shellObjI.c_str();
+
         // Expand placeholders in the commands.
         for(std::vector<std::string>::iterator i = preprocessCommands.begin();
             i != preprocessCommands.end(); ++i)
@@ -738,12 +744,6 @@ cmMakefileTargetGenerator
         commands.insert(commands.end(),
                         preprocessCommands.begin(),
                         preprocessCommands.end());
-
-        std::string shellObjI =
-          this->Convert(objI.c_str(),
-                        cmLocalGenerator::NONE,
-                        cmLocalGenerator::SHELL).c_str();
-        vars.PreprocessedSource = shellObjI.c_str();
         }
       else
         {
@@ -781,6 +781,12 @@ cmMakefileTargetGenerator
         std::vector<std::string> assemblyCommands;
         cmSystemTools::ExpandListArgument(assemblyRule, assemblyCommands);
 
+        std::string shellObjS =
+          this->Convert(objS.c_str(),
+                        cmLocalGenerator::NONE,
+                        cmLocalGenerator::SHELL).c_str();
+        vars.AssemblySource = shellObjS.c_str();
+
         // Expand placeholders in the commands.
         for(std::vector<std::string>::iterator i = assemblyCommands.begin();
             i != assemblyCommands.end(); ++i)
@@ -795,12 +801,6 @@ cmMakefileTargetGenerator
         commands.insert(commands.end(),
                         assemblyCommands.begin(),
                         assemblyCommands.end());
-
-        std::string shellObjS =
-          this->Convert(objS.c_str(),
-                        cmLocalGenerator::NONE,
-                        cmLocalGenerator::SHELL).c_str();
-        vars.AssemblySource = shellObjS.c_str();
         }
       else
         {