From: Yingke Liu Date: Thu, 21 Aug 2014 01:39:18 +0000 (+0000) Subject: 1. AutoGen.c should be generated if it is not empty even if there are no C source... X-Git-Tag: edk2-stable201903~11135 X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=commitdiff_plain;h=fcd4fbf30d77873467ce8e2c386f33425b3ae668 1. AutoGen.c should be generated if it is not empty even if there are no C source files. 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 Reviewed-by: Chen, Hesheng Reviewed-by: Feng, Bob C git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15860 6f19259b-4bc3-4df7-8a09-765794883524 --- diff --git a/BaseTools/Source/Python/AutoGen/AutoGen.py b/BaseTools/Source/Python/AutoGen/AutoGen.py index 36e43478c7..6c9a4ffd2f 100644 --- a/BaseTools/Source/Python/AutoGen/AutoGen.py +++ b/BaseTools/Source/Python/AutoGen/AutoGen.py @@ -2491,6 +2491,9 @@ class ModuleAutoGen(AutoGen): self._BuildTargets = {} self._FileTypes = {} + SubDirectory = os.path.join(self.OutputDir, File.SubDir) + if not os.path.exists(SubDirectory): + CreateDirectory(SubDirectory) LastTarget = None RuleChain = [] SourceList = [File] @@ -2604,7 +2607,7 @@ class ModuleAutoGen(AutoGen): AutoGenH = TemplateString() StringH = TemplateString() GenC.CreateCode(self, AutoGenC, AutoGenH, StringH, UniStringAutoGenC, UniStringBinBuffer) - if str(AutoGenC) != "" and TAB_C_CODE_FILE in self.FileTypes: + if str(AutoGenC) != "": AutoFile = PathClass(gAutoGenCodeFileName, self.DebugDir) self._AutoGenFileList[AutoFile] = str(AutoGenC) self._ApplyBuildRule(AutoFile, TAB_UNKNOWN_FILE)