]> git.proxmox.com Git - mirror_edk2.git/commitdiff
BaseTools: Remove the dependency on the build intermediate file
authorBob Feng <bob.c.feng@intel.com>
Wed, 4 Nov 2020 11:29:45 +0000 (19:29 +0800)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Wed, 4 Nov 2020 12:00:16 +0000 (12:00 +0000)
When generating compressed section, the build tool rely on the
build intermediate files, which were generated in last build, to
get the file list. This method will cause the incremental build to
generate incorrect build result. To reproduce this incremental build
error, you can do:
1. build Ovmf
2. change the module OvmfPkg\AcpiTables a source file Facp.aslc
name from Facp.aslc to Facpxxx.aslc.
3. change the Facp.aslc file name in [sources] section of AcpiTables.inf
4. incremental build Ovmf

you will see the in AcpiTables module Makefile, the corresponding
Facp.acpi file is not changed.

This patch is to make the build always get file list from the INF.

Signed-off-by: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Yuwei Chen <yuwei.chen@intel.com>
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
BaseTools/Source/Python/GenFds/Section.py

index 2acb70f4129c9f203ea200187b6ce88d2bf717af..447828c8e5887678b420d8948fe8028c8e6ba6ce 100644 (file)
@@ -140,22 +140,6 @@ class Section (SectionClassObject):
                     FileList.append(File.Path)\r
 \r
         if (not IsMakefile and Suffix is not None and os.path.exists(FfsInf.EfiOutputPath)) or (IsMakefile and Suffix is not None):\r
-            #\r
-            # Get Makefile path and time stamp\r
-            #\r
-            MakefileDir = FfsInf.EfiOutputPath[:-len('OUTPUT')]\r
-            Makefile = os.path.join(MakefileDir, 'Makefile')\r
-            if not os.path.exists(Makefile):\r
-                Makefile = os.path.join(MakefileDir, 'GNUmakefile')\r
-            if os.path.exists(Makefile):\r
-                # Update to search files with suffix in all sub-dirs.\r
-                Tuple = os.walk(FfsInf.EfiOutputPath)\r
-                for Dirpath, Dirnames, Filenames in Tuple:\r
-                    for F in Filenames:\r
-                        if os.path.splitext(F)[1] == Suffix:\r
-                            FullName = os.path.join(Dirpath, F)\r
-                            if os.path.getmtime(FullName) > os.path.getmtime(Makefile):\r
-                                FileList.append(FullName)\r
             if not FileList:\r
                 SuffixMap = FfsInf.GetFinalTargetSuffixMap()\r
                 if Suffix in SuffixMap:\r