]> git.proxmox.com Git - mirror_edk2.git/commitdiff
BaseTools: remove including Base.h if the module type is not BASE
authorYonghong Zhu <yonghong.zhu@intel.com>
Tue, 12 Jun 2018 05:01:00 +0000 (13:01 +0800)
committerYonghong Zhu <yonghong.zhu@intel.com>
Thu, 14 Jun 2018 06:27:34 +0000 (14:27 +0800)
According the module type to include the header file.

Fixes: https://bugzilla.tianocore.org/show_bug.cgi?id=867
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
BaseTools/Source/Python/AutoGen/GenC.py

index 972e1aea1b8b52569887d55c3cf856c3be970724..ae3af085a16b49151939f33df81d1490ba0b58b4 100644 (file)
@@ -2013,9 +2013,7 @@ def CreateHeaderCode(Info, AutoGenC, AutoGenH):
     AutoGenH.Append(gAutoGenHCppPrologueString)\r
     if Info.AutoGenVersion >= 0x00010005:\r
         # header files includes\r
-        AutoGenH.Append("#include <%s>\n" % gBasicHeaderFile)\r
-        if Info.ModuleType in gModuleTypeHeaderFile \\r
-           and gModuleTypeHeaderFile[Info.ModuleType][0] != gBasicHeaderFile:\r
+        if Info.ModuleType in gModuleTypeHeaderFile:\r
             AutoGenH.Append("#include <%s>\n" % gModuleTypeHeaderFile[Info.ModuleType][0])\r
         #\r
         # if either PcdLib in [LibraryClasses] sections or there exist Pcd section, add PcdLib.h \r