]> git.proxmox.com Git - mirror_edk2.git/commitdiff
1. AutoGen.c should be generated if it is not empty even if there are no C source...
authorYingke Liu <yingke.d.liu@intel.com>
Thu, 21 Aug 2014 01:39:18 +0000 (01:39 +0000)
committeryingke <yingke@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 21 Aug 2014 01:39:18 +0000 (01:39 +0000)
2. If there are sub directories in current module, the corresponding directory in OUTPUT should be created.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yingke Liu <yingke.d.liu@intel.com>
Reviewed-by: Chen, Hesheng <hesheng.chen@intel.com>
Reviewed-by: Feng, Bob C <bob.c.feng@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15860 6f19259b-4bc3-4df7-8a09-765794883524

BaseTools/Source/Python/AutoGen/AutoGen.py

index 36e43478c7f2b16c7d14da524cf4df234e116b81..6c9a4ffd2f257544bfb0341134d360c80d0fefe0 100644 (file)
@@ -2491,6 +2491,9 @@ class ModuleAutoGen(AutoGen):
             self._BuildTargets = {}\r
             self._FileTypes = {}\r
 \r
+        SubDirectory = os.path.join(self.OutputDir, File.SubDir)\r
+        if not os.path.exists(SubDirectory):\r
+            CreateDirectory(SubDirectory)\r
         LastTarget = None\r
         RuleChain = []\r
         SourceList = [File]\r
@@ -2604,7 +2607,7 @@ class ModuleAutoGen(AutoGen):
             AutoGenH = TemplateString()\r
             StringH = TemplateString()\r
             GenC.CreateCode(self, AutoGenC, AutoGenH, StringH, UniStringAutoGenC, UniStringBinBuffer)\r
-            if str(AutoGenC) != "" and TAB_C_CODE_FILE in self.FileTypes:\r
+            if str(AutoGenC) != "":\r
                 AutoFile = PathClass(gAutoGenCodeFileName, self.DebugDir)\r
                 self._AutoGenFileList[AutoFile] = str(AutoGenC)\r
                 self._ApplyBuildRule(AutoFile, TAB_UNKNOWN_FILE)\r