|
From: <js...@us...> - 2011-09-09 02:32:46
|
Revision: 2303
http://edk2-buildtools.svn.sourceforge.net/edk2-buildtools/?rev=2303&view=rev
Author: jsu1
Date: 2011-09-09 02:32:40 +0000 (Fri, 09 Sep 2011)
Log Message:
-----------
Enhance build tool to also check [Pcd] section to include <Library/PcdLib.h> in AutoGen.h.
Signed-off-by: jsu1
Reviewed-by: gikidy
Modified Paths:
--------------
trunk/BaseTools/Source/Python/AutoGen/GenC.py
Modified: trunk/BaseTools/Source/Python/AutoGen/GenC.py
===================================================================
--- trunk/BaseTools/Source/Python/AutoGen/GenC.py 2011-09-08 07:45:17 UTC (rev 2302)
+++ trunk/BaseTools/Source/Python/AutoGen/GenC.py 2011-09-09 02:32:40 UTC (rev 2303)
@@ -1959,7 +1959,11 @@
if Info.ModuleType in gModuleTypeHeaderFile \
and gModuleTypeHeaderFile[Info.ModuleType][0] != gBasicHeaderFile:
AutoGenH.Append("#include <%s>\n" % gModuleTypeHeaderFile[Info.ModuleType][0])
- if 'PcdLib' in Info.Module.LibraryClasses:
+ #
+ # if either PcdLib in [LibraryClasses] sections or there exist Pcd section, add PcdLib.h
+ # As if modules only uses FixedPcd, then PcdLib is not needed in [LibraryClasses] section.
+ #
+ if 'PcdLib' in Info.Module.LibraryClasses or Info.Module.Pcds:
AutoGenH.Append("#include <Library/PcdLib.h>\n")
AutoGenH.Append('\nextern GUID gEfiCallerIdGuid;\n\n')
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|