summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYingke Liu <yingke.d.liu@intel.com>2014-08-21 01:39:18 +0000
committeryingke <yingke@6f19259b-4bc3-4df7-8a09-765794883524>2014-08-21 01:39:18 +0000
commitfcd4fbf30d77873467ce8e2c386f33425b3ae668 (patch)
tree9dab5aa64713d1a63df42dd95a42a6bea420b59d
parent0e398dc7392bcf5f855ab76192f226051b05a309 (diff)
downloadedk2-platforms-fcd4fbf30d77873467ce8e2c386f33425b3ae668.tar.xz
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 <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
-rw-r--r--BaseTools/Source/Python/AutoGen/AutoGen.py5
1 files changed, 4 insertions, 1 deletions
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)