]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/Python/AutoGen/GenMake.py
BaseTools: Fix the bug for CArray PCD override in command line
[mirror_edk2.git] / BaseTools / Source / Python / AutoGen / GenMake.py
index c8c5fc53860d7f6c35371a0b0565bbd624d3005d..0f3ddd5dd44498258516ec5c6aee79221b3fc98f 100644 (file)
@@ -1,7 +1,7 @@
 ## @file\r
 # Create makefile for MS nmake and GNU make\r
 #\r
-# Copyright (c) 2007 - 2016, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.<BR>\r
 # This program and the accompanying materials\r
 # are licensed and made available under the terms and conditions of the BSD License\r
 # which accompanies this distribution.  The full text of the license may be found at\r
@@ -386,7 +386,7 @@ ${END}
 #\r
 clean:\r
 \t${BEGIN}${clean_command}\r
-\t${END}\r
+\t${END}\t$(RM) AutoGenTimeStamp\r
 \r
 #\r
 # clean all generated files\r
@@ -395,6 +395,7 @@ cleanall:
 ${BEGIN}\t${cleanall_command}\r
 ${END}\t$(RM) *.pdb *.idb > NUL 2>&1\r
 \t$(RM) $(BIN_DIR)${separator}$(MODULE_NAME).efi\r
+\t$(RM) AutoGenTimeStamp\r
 \r
 #\r
 # clean all dependent libraries built\r
@@ -768,7 +769,11 @@ cleanlib:
                                     break\r
                             else:\r
                                 break\r
-                        RespDict[Key] = Value\r
+\r
+                        if self._AutoGenObject.ToolChainFamily == 'GCC':\r
+                            RespDict[Key] = Value.replace('\\', '/')\r
+                        else:\r
+                            RespDict[Key] = Value\r
                         for Target in BuildTargets:\r
                             for i, SingleCommand in enumerate(BuildTargets[Target].Commands):\r
                                 if FlagDict[Flag]['Macro'] in SingleCommand:\r
@@ -797,6 +802,9 @@ cleanlib:
             if not self.FileDependency[File]:\r
                 self.FileDependency[File] = ['$(FORCE_REBUILD)']\r
                 continue\r
+\r
+            self._AutoGenObject.AutoGenDepSet |= set(self.FileDependency[File])\r
+\r
             # skip non-C files\r
             if File.Ext not in [".c", ".C"] or File.Name == "AutoGen.c":\r
                 continue\r
@@ -1445,7 +1453,15 @@ class TopLevelMakefile(BuildFile):
         if GlobalData.BuildOptionPcd:\r
             for index, option in enumerate(GlobalData.gCommand):\r
                 if "--pcd" == option and GlobalData.gCommand[index+1]:\r
-                    ExtraOption += " --pcd " + GlobalData.gCommand[index+1]\r
+                    pcdName, pcdValue = GlobalData.gCommand[index+1].split('=')\r
+                    if pcdValue.startswith('H'):\r
+                        pcdValue = 'H' + '"' + pcdValue[1:] + '"'\r
+                        ExtraOption += " --pcd " + pcdName + '=' + pcdValue\r
+                    elif pcdValue.startswith('L'):\r
+                        pcdValue = 'L' + '"' + pcdValue[1:] + '"'\r
+                        ExtraOption += " --pcd " + pcdName + '=' + pcdValue\r
+                    else:\r
+                        ExtraOption += " --pcd " + GlobalData.gCommand[index+1]\r
 \r
         MakefileName = self._FILE_NAME_[self._FileType]\r
         SubBuildCommandList = []\r