Revision: 15864
          http://sourceforge.net/p/edk2/code/15864
Author:   yingke
Date:     2014-08-21 07:12:33 +0000 (Thu, 21 Aug 2014)
Log Message:
-----------
AutoGen.c can only be generated if the module has intermediate object files 
generated or links other libraries.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yingke Liu <[email protected]>
Reviewed-by: Liming Gao <[email protected]>

Modified Paths:
--------------
    trunk/edk2/BaseTools/Source/Python/AutoGen/AutoGen.py
    trunk/edk2/BaseTools/Source/Python/Common/DataType.py

Modified: trunk/edk2/BaseTools/Source/Python/AutoGen/AutoGen.py
===================================================================
--- trunk/edk2/BaseTools/Source/Python/AutoGen/AutoGen.py       2014-08-21 
05:35:25 UTC (rev 15863)
+++ trunk/edk2/BaseTools/Source/Python/AutoGen/AutoGen.py       2014-08-21 
07:12:33 UTC (rev 15864)
@@ -2607,7 +2607,11 @@
             AutoGenH = TemplateString()
             StringH = TemplateString()
             GenC.CreateCode(self, AutoGenC, AutoGenH, StringH, 
UniStringAutoGenC, UniStringBinBuffer)
-            if str(AutoGenC) != "":
+            #
+            # AutoGen.c is generated if there are library classes in inf, or 
there are object files
+            #
+            if str(AutoGenC) != "" and (len(self.Module.LibraryClasses) > 0
+                                        or TAB_OBJECT_FILE in self.FileTypes):
                 AutoFile = PathClass(gAutoGenCodeFileName, self.DebugDir)
                 self._AutoGenFileList[AutoFile] = str(AutoGenC)
                 self._ApplyBuildRule(AutoFile, TAB_UNKNOWN_FILE)

Modified: trunk/edk2/BaseTools/Source/Python/Common/DataType.py
===================================================================
--- trunk/edk2/BaseTools/Source/Python/Common/DataType.py       2014-08-21 
05:35:25 UTC (rev 15863)
+++ trunk/edk2/BaseTools/Source/Python/Common/DataType.py       2014-08-21 
07:12:33 UTC (rev 15864)
@@ -468,6 +468,7 @@
 TAB_DEPENDENCY_EXPRESSION_FILE = "DEPENDENCY-EXPRESSION-FILE"
 TAB_UNKNOWN_FILE = "UNKNOWN-TYPE-FILE"
 TAB_DEFAULT_BINARY_FILE = "_BINARY_FILE_"
+TAB_OBJECT_FILE = "OBJECT-FILE"
 
 # used by BRG
 TAB_BRG_PCD = 'PCD'

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits

Reply via email to