public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH 00/45] ArmVirtPkg, OvmfPkg: list module-internal headers in INF files
@ 2018-03-11  1:48 Laszlo Ersek
  2018-03-11  1:48 ` [PATCH 01/45] ArmVirtPkg/PlatformBootManagerLib: list "PlatformBm.h" in INF file Laszlo Ersek
                   ` (46 more replies)
  0 siblings, 47 replies; 58+ messages in thread
From: Laszlo Ersek @ 2018-03-11  1:48 UTC (permalink / raw)
  To: edk2-devel-01
  Cc: Anthony Perard, Ard Biesheuvel, Brijesh Singh, Jordan Justen,
	Julien Grall, Phil Dennis-Jordan

Repo:   https://github.com/lersek/edk2.git
Branch: hdr_inf_cleanup

In
<http://mid.mail-archive.com/E92EE9817A31E24EB0585FDF735412F56327F7D3@ORSMSX113.amr.corp.intel.com>,
Mike explained why it's a good idea to list module-internal *.h files in
the [Sources*] sections of the INF files:

On 11/23/15 21:28, Kinney, Michael D wrote:
> There are 2 reasons to list all source files used in a module build in
> the [Sources] section.
>
> 1) Support incremental builds.  If a change to the .h file is made,
>    then the module may  not be rebuilt if the .h file is not listed in
>    [Sources]
> 2) Support of UEFI Distribution Package distribution format.  The UPT
>    tools that creates UDP packages uses the [Sources] section for the
>    inventory of files.  If a file is missing, then it will not be
>    included in the UDP file.

In only two years and three-four months, I've finally come around
addressing (1) under ArmVirtPkg and OvmfPkg. The affected *.inf and *.h
files were located with the following crude script:

> #!/bin/bash
>
> export LC_ALL=C
>
> find ArmVirtPkg/ OvmfPkg/ -type f -name '*.inf' \
> | sort \
> | while read INF; do
>     INF_D=$(dirname -- "$INF")
>     INF_F=$(basename -- "$INF")
>     (
>       cd "$INF_D"
>       find -type f -name '*.h' \
>       | cut -c 3- \
>       | sort \
>       | while read REL_H; do
>           if ! grep -q -F -e "  $REL_H" -- "$INF_F"; then
>             printf '%s: %s\n' "$INF" "$REL_H"
>           fi
>         done
>     )
>   done

This patch set brings the output down to nil, from the following 45
lines (note that the patch count equaling 45 is a coincidence):

> ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf: PlatformBm.h
> ArmVirtPkg/PrePi/ArmVirtPrePiUniCoreRelocatable.inf: PrePi.h
> OvmfPkg/AcpiPlatformDxe/AcpiPlatformDxe.inf: AcpiPlatform.h
> OvmfPkg/AcpiPlatformDxe/AcpiPlatformDxe.inf: QemuLoader.h
> OvmfPkg/AcpiPlatformDxe/QemuFwCfgAcpiPlatformDxe.inf: AcpiPlatform.h
> OvmfPkg/AcpiPlatformDxe/QemuFwCfgAcpiPlatformDxe.inf: QemuLoader.h
> OvmfPkg/BlockMmioToBlockIoDxe/BlockIo.inf: BlockIo.h
> OvmfPkg/Csm/CsmSupportLib/CsmSupportLib.inf: CsmSupportLib.h
> OvmfPkg/Csm/CsmSupportLib/CsmSupportLib.inf: LegacyInterrupt.h
> OvmfPkg/Csm/CsmSupportLib/CsmSupportLib.inf: LegacyPlatform.h
> OvmfPkg/Csm/CsmSupportLib/CsmSupportLib.inf: LegacyRegion.h
> OvmfPkg/EmuVariableFvbRuntimeDxe/Fvb.inf: Fvb.h
> OvmfPkg/IoMmuDxe/IoMmuDxe.inf: AmdSevIoMmu.h
> OvmfPkg/Library/AcpiTimerLib/BaseAcpiTimerLib.inf: AcpiTimerLib.h
> OvmfPkg/Library/AcpiTimerLib/BaseRomAcpiTimerLib.inf: AcpiTimerLib.h
> OvmfPkg/Library/AcpiTimerLib/DxeAcpiTimerLib.inf: AcpiTimerLib.h
> OvmfPkg/Library/BaseMemEncryptSevLib/BaseMemEncryptSevLib.inf: X64/VirtualMemory.h
> OvmfPkg/Library/LoadLinuxLib/LoadLinuxLib.inf: LoadLinuxLib.h
> OvmfPkg/Library/LockBoxLib/LockBoxBaseLib.inf: LockBoxLib.h
> OvmfPkg/Library/LockBoxLib/LockBoxDxeLib.inf: LockBoxLib.h
> OvmfPkg/Library/NvVarsFileLib/NvVarsFileLib.inf: NvVarsFileLib.h
> OvmfPkg/Library/PlatformDebugLibIoPort/PlatformDebugLibIoPort.inf: DebugLibDetect.h
> OvmfPkg/Library/PlatformDebugLibIoPort/PlatformRomDebugLibIoPort.inf: DebugLibDetect.h
> OvmfPkg/Library/QemuBootOrderLib/QemuBootOrderLib.inf: ExtraRootBusMap.h
> OvmfPkg/Library/SerializeVariablesLib/SerializeVariablesLib.inf: SerializeVariablesLib.h
> OvmfPkg/Library/VirtioMmioDeviceLib/VirtioMmioDeviceLib.inf: VirtioMmioDevice.h
> OvmfPkg/PlatformDxe/Platform.inf: Platform.h
> OvmfPkg/PlatformDxe/Platform.inf: PlatformConfig.h
> OvmfPkg/PlatformPei/PlatformPei.inf: Cmos.h
> OvmfPkg/PlatformPei/PlatformPei.inf: Platform.h
> OvmfPkg/PlatformPei/PlatformPei.inf: Xen.h
> OvmfPkg/QemuFlashFvbServicesRuntimeDxe/FvbServicesRuntimeDxe.inf: FwBlockService.h
> OvmfPkg/QemuFlashFvbServicesRuntimeDxe/FvbServicesRuntimeDxe.inf: QemuFlash.h
> OvmfPkg/QemuFlashFvbServicesRuntimeDxe/FvbServicesSmm.inf: FwBlockService.h
> OvmfPkg/QemuFlashFvbServicesRuntimeDxe/FvbServicesSmm.inf: QemuFlash.h
> OvmfPkg/QemuVideoDxe/QemuVideoDxe.inf: Qemu.h
> OvmfPkg/QemuVideoDxe/QemuVideoDxe.inf: UnalignedIoInternal.h
> OvmfPkg/QemuVideoDxe/QemuVideoDxe.inf: VbeShim.h
> OvmfPkg/Virtio10Dxe/Virtio10.inf: Virtio10.h
> OvmfPkg/VirtioBlkDxe/VirtioBlk.inf: VirtioBlk.h
> OvmfPkg/VirtioNetDxe/VirtioNet.inf: VirtioNet.h
> OvmfPkg/VirtioPciDeviceDxe/VirtioPciDeviceDxe.inf: VirtioPciDevice.h
> OvmfPkg/VirtioRngDxe/VirtioRng.inf: VirtioRng.h
> OvmfPkg/VirtioScsiDxe/VirtioScsi.inf: VirtioScsi.h
> OvmfPkg/XenPvBlkDxe/XenPvBlkDxe.inf: DriverBinding.h

In the future, we shall ask for patches to be respun unless they (a)
keep the [Sources*] sections sorted and (b) list any new module-internal
header files there.

Cc: Anthony Perard <anthony.perard@citrix.com>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Brijesh Singh <brijesh.singh@amd.com>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Julien Grall <julien.grall@linaro.org>
Cc: Phil Dennis-Jordan <phil@philjordan.eu>

Thanks,
Laszlo

Laszlo Ersek (45):
  ArmVirtPkg/PlatformBootManagerLib: list "PlatformBm.h" in INF file
  ArmVirtPkg/ArmVirtPrePiUniCoreRelocatable: sort [Sources*] sections in
    INF
  ArmVirtPkg/ArmVirtPrePiUniCoreRelocatable: list "PrePi.h" in INF file
  OvmfPkg/AcpiPlatformDxe: sort [Sources*] sections in the INF files
  OvmfPkg/AcpiPlatformDxe: list "AcpiPlatform.h" in the INF files
  OvmfPkg/AcpiPlatformDxe: don't #include "QemuLoader.h" in "Qemu.c"
  OvmfPkg/AcpiPlatformDxe: list "QemuLoader.h" in the INF files
  OvmfPkg/BlockMmioToBlockIoDxe: list "BlockIo.h" in the INF file
  OvmfPkg/CsmSupportLib: sort [Sources*] sections in the INF file
  OvmfPkg/CsmSupportLib: list "CsmSupportLib.h" in the INF file
  OvmfPkg/CsmSupportLib: list "LegacyInterrupt.h" in the INF file
  OvmfPkg/CsmSupportLib: list "LegacyPlatform.h" in the INF file
  OvmfPkg/CsmSupportLib: list "LegacyRegion.h" in the INF file
  OvmfPkg/EmuVariableFvbRuntimeDxe: list "Fvb.h" in the INF file
  OvmfPkg/IoMmuDxe: list "AmdSevIoMmu.h" in the INF file
  OvmfPkg/AcpiTimerLib: list "AcpiTimerLib.h" in the INF files
  OvmfPkg/BaseMemEncryptSevLib: list "X64/VirtualMemory.h" in the INF
    file
  OvmfPkg/LoadLinuxLib: list "LoadLinuxLib.h" in the INF file
  OvmfPkg/LockBoxLib: list "LockBoxLib.h" in the INF files
  OvmfPkg/NvVarsFileLib: list "NvVarsFileLib.h" in the INF file
  OvmfPkg/PlatformDebugLibIoPort: list "DebugLibDetect.h" in the INF
    files
  OvmfPkg/QemuBootOrderLib: sort [Sources*] sections in the INF file
  OvmfPkg/QemuBootOrderLib: list "ExtraRootBusMap.h" in the INF file
  OvmfPkg/SerializeVariablesLib: list "SerializeVariablesLib.h" in INF
    file
  OvmfPkg/VirtioMmioDeviceLib: list "VirtioMmioDevice.h" in the INF file
  OvmfPkg/VirtioMmioDeviceLib: improve style of
    mMmioDeviceProtocolTemplate
  OvmfPkg/PlatformDxe: list "Platform.h" in the INF file
  OvmfPkg/PlatformDxe: list "PlatformConfig.h" in the INF file
  OvmfPkg/PlatformPei: list "Cmos.h" in the INF file
  OvmfPkg/PlatformPei: list "Platform.h" in the INF file
  OvmfPkg/PlatformPei: list "Xen.h" in the INF file
  OvmfPkg/QemuFlashFvbServicesRuntimeDxe: list "FwBlockService.h" in
    INFs
  OvmfPkg/QemuFlashFvbServicesRuntimeDxe: list "QemuFlash.h" in INF
    files
  OvmfPkg/QemuVideoDxe: sort [Sources*] sections in the INF file
  OvmfPkg/QemuVideoDxe: list "Qemu.h" in the INF file
  OvmfPkg/QemuVideoDxe: list "UnalignedIoInternal.h" in the INF file
  OvmfPkg/QemuVideoDxe: list "VbeShim.h" in the INF file
  OvmfPkg/Virtio10Dxe: list "Virtio10.h" in the INF file
  OvmfPkg/VirtioBlkDxe: list "VirtioBlk.h" in the INF file
  OvmfPkg/VirtioNetDxe: list "VirtioNet.h" in the INF file
  OvmfPkg/VirtioPciDeviceDxe: list "VirtioPciDevice.h" in the INF file
  OvmfPkg/VirtioRngDxe: list "VirtioRng.h" in the INF file
  OvmfPkg/VirtioScsiDxe: list "VirtioScsi.h" in the INF file
  OvmfPkg/XenPvBlkDxe: sort [Sources*] sections in the INF file
  OvmfPkg/XenPvBlkDxe: list "DriverBinding.h" in the INF file

 ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf | 1 +
 ArmVirtPkg/PrePi/ArmVirtPrePiUniCoreRelocatable.inf                  | 3 ++-
 OvmfPkg/AcpiPlatformDxe/AcpiPlatformDxe.inf                          | 8 +++++---
 OvmfPkg/AcpiPlatformDxe/Qemu.c                                       | 1 -
 OvmfPkg/AcpiPlatformDxe/QemuFwCfgAcpiPlatformDxe.inf                 | 8 +++++---
 OvmfPkg/BlockMmioToBlockIoDxe/BlockIo.inf                            | 1 +
 OvmfPkg/Csm/CsmSupportLib/CsmSupportLib.inf                          | 6 +++++-
 OvmfPkg/EmuVariableFvbRuntimeDxe/Fvb.inf                             | 1 +
 OvmfPkg/IoMmuDxe/IoMmuDxe.inf                                        | 1 +
 OvmfPkg/Library/AcpiTimerLib/BaseAcpiTimerLib.inf                    | 1 +
 OvmfPkg/Library/AcpiTimerLib/BaseRomAcpiTimerLib.inf                 | 1 +
 OvmfPkg/Library/AcpiTimerLib/DxeAcpiTimerLib.inf                     | 1 +
 OvmfPkg/Library/BaseMemEncryptSevLib/BaseMemEncryptSevLib.inf        | 1 +
 OvmfPkg/Library/LoadLinuxLib/LoadLinuxLib.inf                        | 1 +
 OvmfPkg/Library/LockBoxLib/LockBoxBaseLib.inf                        | 1 +
 OvmfPkg/Library/LockBoxLib/LockBoxDxeLib.inf                         | 1 +
 OvmfPkg/Library/NvVarsFileLib/NvVarsFileLib.inf                      | 1 +
 OvmfPkg/Library/PlatformDebugLibIoPort/PlatformDebugLibIoPort.inf    | 1 +
 OvmfPkg/Library/PlatformDebugLibIoPort/PlatformRomDebugLibIoPort.inf | 1 +
 OvmfPkg/Library/QemuBootOrderLib/QemuBootOrderLib.inf                | 3 ++-
 OvmfPkg/Library/SerializeVariablesLib/SerializeVariablesLib.inf      | 1 +
 OvmfPkg/Library/VirtioMmioDeviceLib/VirtioMmioDevice.c               | 2 +-
 OvmfPkg/Library/VirtioMmioDeviceLib/VirtioMmioDeviceLib.inf          | 1 +
 OvmfPkg/PlatformDxe/Platform.inf                                     | 2 ++
 OvmfPkg/PlatformPei/PlatformPei.inf                                  | 3 +++
 OvmfPkg/QemuFlashFvbServicesRuntimeDxe/FvbServicesRuntimeDxe.inf     | 2 ++
 OvmfPkg/QemuFlashFvbServicesRuntimeDxe/FvbServicesSmm.inf            | 2 ++
 OvmfPkg/QemuVideoDxe/QemuVideoDxe.inf                                | 7 +++++--
 OvmfPkg/Virtio10Dxe/Virtio10.inf                                     | 1 +
 OvmfPkg/VirtioBlkDxe/VirtioBlk.inf                                   | 1 +
 OvmfPkg/VirtioNetDxe/VirtioNet.inf                                   | 1 +
 OvmfPkg/VirtioPciDeviceDxe/VirtioPciDeviceDxe.inf                    | 1 +
 OvmfPkg/VirtioRngDxe/VirtioRng.inf                                   | 1 +
 OvmfPkg/VirtioScsiDxe/VirtioScsi.inf                                 | 1 +
 OvmfPkg/XenPvBlkDxe/XenPvBlkDxe.inf                                  | 9 +++++----
 35 files changed, 61 insertions(+), 17 deletions(-)

-- 
2.14.1.3.gb7cf6e02401b



^ permalink raw reply	[flat|nested] 58+ messages in thread

end of thread, other threads:[~2018-03-13 13:27 UTC | newest]

Thread overview: 58+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-11  1:48 [PATCH 00/45] ArmVirtPkg, OvmfPkg: list module-internal headers in INF files Laszlo Ersek
2018-03-11  1:48 ` [PATCH 01/45] ArmVirtPkg/PlatformBootManagerLib: list "PlatformBm.h" in INF file Laszlo Ersek
2018-03-11  1:48 ` [PATCH 02/45] ArmVirtPkg/ArmVirtPrePiUniCoreRelocatable: sort [Sources*] sections in INF Laszlo Ersek
2018-03-11  1:48 ` [PATCH 03/45] ArmVirtPkg/ArmVirtPrePiUniCoreRelocatable: list "PrePi.h" in INF file Laszlo Ersek
2018-03-11  1:48 ` [PATCH 04/45] OvmfPkg/AcpiPlatformDxe: sort [Sources*] sections in the INF files Laszlo Ersek
2018-03-11  1:48 ` [PATCH 05/45] OvmfPkg/AcpiPlatformDxe: list "AcpiPlatform.h" " Laszlo Ersek
2018-03-11  1:48 ` [PATCH 06/45] OvmfPkg/AcpiPlatformDxe: don't #include "QemuLoader.h" in "Qemu.c" Laszlo Ersek
2018-03-11  1:48 ` [PATCH 07/45] OvmfPkg/AcpiPlatformDxe: list "QemuLoader.h" in the INF files Laszlo Ersek
2018-03-11  1:48 ` [PATCH 08/45] OvmfPkg/BlockMmioToBlockIoDxe: list "BlockIo.h" in the INF file Laszlo Ersek
2018-03-11  1:48 ` [PATCH 09/45] OvmfPkg/CsmSupportLib: sort [Sources*] sections " Laszlo Ersek
2018-03-11  1:48 ` [PATCH 10/45] OvmfPkg/CsmSupportLib: list "CsmSupportLib.h" " Laszlo Ersek
2018-03-11  1:48 ` [PATCH 11/45] OvmfPkg/CsmSupportLib: list "LegacyInterrupt.h" " Laszlo Ersek
2018-03-11  1:48 ` [PATCH 12/45] OvmfPkg/CsmSupportLib: list "LegacyPlatform.h" " Laszlo Ersek
2018-03-11  1:48 ` [PATCH 13/45] OvmfPkg/CsmSupportLib: list "LegacyRegion.h" " Laszlo Ersek
2018-03-11  1:48 ` [PATCH 14/45] OvmfPkg/EmuVariableFvbRuntimeDxe: list "Fvb.h" " Laszlo Ersek
2018-03-11  1:48 ` [PATCH 15/45] OvmfPkg/IoMmuDxe: list "AmdSevIoMmu.h" " Laszlo Ersek
2018-03-11 15:08   ` Brijesh Singh
2018-03-11  1:48 ` [PATCH 16/45] OvmfPkg/AcpiTimerLib: list "AcpiTimerLib.h" in the INF files Laszlo Ersek
2018-03-11  1:48 ` [PATCH 17/45] OvmfPkg/BaseMemEncryptSevLib: list "X64/VirtualMemory.h" in the INF file Laszlo Ersek
2018-03-11  1:48 ` [PATCH 18/45] OvmfPkg/LoadLinuxLib: list "LoadLinuxLib.h" " Laszlo Ersek
2018-03-11  1:49 ` [PATCH 19/45] OvmfPkg/LockBoxLib: list "LockBoxLib.h" in the INF files Laszlo Ersek
2018-03-11  1:49 ` [PATCH 20/45] OvmfPkg/NvVarsFileLib: list "NvVarsFileLib.h" in the INF file Laszlo Ersek
2018-03-11  1:49 ` [PATCH 21/45] OvmfPkg/PlatformDebugLibIoPort: list "DebugLibDetect.h" in the INF files Laszlo Ersek
2018-03-11  1:49 ` [PATCH 22/45] OvmfPkg/QemuBootOrderLib: sort [Sources*] sections in the INF file Laszlo Ersek
2018-03-11  1:49 ` [PATCH 23/45] OvmfPkg/QemuBootOrderLib: list "ExtraRootBusMap.h" " Laszlo Ersek
2018-03-11  1:49 ` [PATCH 24/45] OvmfPkg/SerializeVariablesLib: list "SerializeVariablesLib.h" in " Laszlo Ersek
2018-03-11  1:49 ` [PATCH 25/45] OvmfPkg/VirtioMmioDeviceLib: list "VirtioMmioDevice.h" in the " Laszlo Ersek
2018-03-11  1:49 ` [PATCH 26/45] OvmfPkg/VirtioMmioDeviceLib: improve style of mMmioDeviceProtocolTemplate Laszlo Ersek
2018-03-11  1:49 ` [PATCH 27/45] OvmfPkg/PlatformDxe: list "Platform.h" in the INF file Laszlo Ersek
2018-03-11  1:49 ` [PATCH 28/45] OvmfPkg/PlatformDxe: list "PlatformConfig.h" " Laszlo Ersek
2018-03-11  1:49 ` [PATCH 29/45] OvmfPkg/PlatformPei: list "Cmos.h" " Laszlo Ersek
2018-03-11  1:49 ` [PATCH 30/45] OvmfPkg/PlatformPei: list "Platform.h" " Laszlo Ersek
2018-03-11  1:49 ` [PATCH 31/45] OvmfPkg/PlatformPei: list "Xen.h" " Laszlo Ersek
2018-03-11  1:49 ` [PATCH 32/45] OvmfPkg/QemuFlashFvbServicesRuntimeDxe: list "FwBlockService.h" in INFs Laszlo Ersek
2018-03-11  1:49 ` [PATCH 33/45] OvmfPkg/QemuFlashFvbServicesRuntimeDxe: list "QemuFlash.h" in INF files Laszlo Ersek
2018-03-11  1:49 ` [PATCH 34/45] OvmfPkg/QemuVideoDxe: sort [Sources*] sections in the INF file Laszlo Ersek
2018-03-11  1:49 ` [PATCH 35/45] OvmfPkg/QemuVideoDxe: list "Qemu.h" " Laszlo Ersek
2018-03-11  1:49 ` [PATCH 36/45] OvmfPkg/QemuVideoDxe: list "UnalignedIoInternal.h" " Laszlo Ersek
2018-03-11  1:49 ` [PATCH 37/45] OvmfPkg/QemuVideoDxe: list "VbeShim.h" " Laszlo Ersek
2018-03-11  1:49 ` [PATCH 38/45] OvmfPkg/Virtio10Dxe: list "Virtio10.h" " Laszlo Ersek
2018-03-11  1:49 ` [PATCH 39/45] OvmfPkg/VirtioBlkDxe: list "VirtioBlk.h" " Laszlo Ersek
2018-03-11  1:49 ` [PATCH 40/45] OvmfPkg/VirtioNetDxe: list "VirtioNet.h" " Laszlo Ersek
2018-03-11  1:49 ` [PATCH 41/45] OvmfPkg/VirtioPciDeviceDxe: list "VirtioPciDevice.h" " Laszlo Ersek
2018-03-11  1:49 ` [PATCH 42/45] OvmfPkg/VirtioRngDxe: list "VirtioRng.h" " Laszlo Ersek
2018-03-11  1:49 ` [PATCH 43/45] OvmfPkg/VirtioScsiDxe: list "VirtioScsi.h" " Laszlo Ersek
2018-03-11  1:49 ` [PATCH 44/45] OvmfPkg/XenPvBlkDxe: sort [Sources*] sections " Laszlo Ersek
2018-03-11  1:49 ` [PATCH 45/45] OvmfPkg/XenPvBlkDxe: list "DriverBinding.h" " Laszlo Ersek
2018-03-11  8:15 ` [PATCH 00/45] ArmVirtPkg, OvmfPkg: list module-internal headers in INF files Ard Biesheuvel
2018-03-11 11:48   ` Laszlo Ersek
2018-03-11 11:54     ` Ard Biesheuvel
2018-03-12  8:43       ` Jordan Justen
2018-03-12 12:10         ` Laszlo Ersek
2018-03-12 16:57           ` Jordan Justen
2018-03-12 17:18             ` Laszlo Ersek
2018-03-12 12:06       ` Laszlo Ersek
2018-03-12 12:23         ` Ard Biesheuvel
2018-03-12 12:41           ` Laszlo Ersek
2018-03-13 13:34 ` Laszlo Ersek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox