[edk2-devel] [PATCH 1/1] BaseTools/Scripts/PatchCheck.py: Check for *.makefile

Michael D Kinney michael.d.kinney at intel.com
Fri Mar 24 18:46:14 UTC 2023



> -----Original Message-----
> From: Rebecca Cran <rebecca at bsdio.com>
> Sent: Friday, March 24, 2023 9:32 AM
> To: devel at edk2.groups.io; Feng, Bob C <bob.c.feng at intel.com>; Gao, Liming <gaoliming at byosoft.com.cn>; Chen, Christine
> <yuwei.chen at intel.com>; Kinney, Michael D <michael.d.kinney at intel.com>
> Cc: Rebecca Cran <rebecca at bsdio.com>
> Subject: [PATCH 1/1] BaseTools/Scripts/PatchCheck.py: Check for *.makefile
> 
> When checking for Makefiles, in addition to Makefile and GNUmakefile,
> also check for *.makefile: this allows {header,footer,app,lib}.makefile
> in BaseTools/Source/C/Makefiles to be detected and avoid having
> PatchCheck.py complain about tab characters.
> 
> Signed-off-by: Rebecca Cran <rebecca at bsdio.com>
> ---
>  BaseTools/Scripts/PatchCheck.py | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/BaseTools/Scripts/PatchCheck.py b/BaseTools/Scripts/PatchCheck.py
> index fcdabfc8acea..3910015d173e 100755
> --- a/BaseTools/Scripts/PatchCheck.py
> +++ b/BaseTools/Scripts/PatchCheck.py
> @@ -383,7 +383,8 @@ class GitDiffCheck:
>                      self.force_crlf = False
>                      self.force_notabs = False
>                  if os.path.basename(self.filename) == 'GNUmakefile' or \
> -                   os.path.basename(self.filename) == 'Makefile':
> +                   os.path.basename(self.filename) == 'Makefile' or \
> +                   os.path.basename(self.filename).endswith("makefile"):

Should is be ".makefile" or perhaps use os.path.splitext() instead?

>                      self.force_notabs = False
>              elif len(line.rstrip()) != 0:
>                  self.format_error("didn't find diff command")
> --
> 2.34.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#101818): https://edk2.groups.io/g/devel/message/101818
Mute This Topic: https://groups.io/mt/97827575/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/leave/3943202/1813853/130120423/xyzzy [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-




More information about the edk2-devel-archive mailing list