Revision: 15897
          http://sourceforge.net/p/edk2/code/15897
Author:   hchen30
Date:     2014-08-26 07:14:38 +0000 (Tue, 26 Aug 2014)
Log Message:
-----------
This patch is going to:
1.       Support a force binary build mode by adding 
?\226?\128?\156--ignore-source?\226?\128?\157 to command line options.

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

Modified Paths:
--------------
    trunk/edk2/BaseTools/Source/Python/AutoGen/AutoGen.py
    trunk/edk2/BaseTools/Source/Python/Workspace/WorkspaceDatabase.py
    trunk/edk2/BaseTools/Source/Python/build/build.py

Modified: trunk/edk2/BaseTools/Source/Python/AutoGen/AutoGen.py
===================================================================
--- trunk/edk2/BaseTools/Source/Python/AutoGen/AutoGen.py       2014-08-26 
05:58:02 UTC (rev 15896)
+++ trunk/edk2/BaseTools/Source/Python/AutoGen/AutoGen.py       2014-08-26 
07:14:38 UTC (rev 15897)
@@ -3160,8 +3160,10 @@
     #                                       dependent libraries will be created
     #
     def CreateMakeFile(self, CreateLibraryMakeFile=True):
+        # Ignore generating makefile when it is a binary module
         if self.IsBinaryModule:
             return
+
         if self.IsMakeFileCreated:
             return
 

Modified: trunk/edk2/BaseTools/Source/Python/Workspace/WorkspaceDatabase.py
===================================================================
--- trunk/edk2/BaseTools/Source/Python/Workspace/WorkspaceDatabase.py   
2014-08-26 05:58:02 UTC (rev 15896)
+++ trunk/edk2/BaseTools/Source/Python/Workspace/WorkspaceDatabase.py   
2014-08-26 07:14:38 UTC (rev 15897)
@@ -2051,6 +2051,11 @@
             return False
     ## Retrieve source files
     def _GetSourceFiles(self):
+        #Ignore all source files in a binary build mode
+        if GlobalData.gIgnoreSource:
+            self._Sources = []
+            return self._Sources
+
         if self._Sources == None:
             self._Sources = []
             RecordList = self._RawData[MODEL_EFI_SOURCE_FILE, self._Arch, 
self._Platform]

Modified: trunk/edk2/BaseTools/Source/Python/build/build.py
===================================================================
--- trunk/edk2/BaseTools/Source/Python/build/build.py   2014-08-26 05:58:02 UTC 
(rev 15896)
+++ trunk/edk2/BaseTools/Source/Python/build/build.py   2014-08-26 07:14:38 UTC 
(rev 15897)
@@ -736,6 +736,8 @@
         self.BuildReport    = BuildReport(BuildOptions.ReportFile, 
BuildOptions.ReportType)
         self.TargetTxt      = TargetTxtClassObject()
         self.ToolDef        = ToolDefClassObject()
+        #Set global flag for build mode
+        GlobalData.gIgnoreSource = BuildOptions.IgnoreSources
         if BuildOptions.DisableCache:
             self.Db         = WorkspaceDatabase(":memory:")
         else:
@@ -1903,6 +1905,7 @@
              "This option can also be specified by setting *_*_*_BUILD_FLAGS 
in [BuildOptions] section of platform DSC. If they are both specified, this 
value "\
              "will override the setting in [BuildOptions] section of platform 
DSC.")
     Parser.add_option("-N", "--no-cache", action="store_true", 
dest="DisableCache", default=False, help="Disable build cache mechanism")
+    Parser.add_option("--ignore-sources", action="store_true", 
dest="IgnoreSources", default=False, help="Focus to a binary build and ignore 
all source files")
 
     (Opt, Args)=Parser.parse_args()
     return (Opt, Args)

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