summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorArthur Heymans <arthur@aheymans.xyz>2019-11-05 12:06:59 +0100
committerPatrick Georgi <pgeorgi@google.com>2019-11-06 14:01:00 +0000
commit55f01326cc04f8366a451bcaa4308531281a32d4 (patch)
treed0cafd8d53224ec280d8b02187d6638f87fb5d7d /util
parent4e39c824e07f192c35afa88dcceee863528dbd32 (diff)
downloadcoreboot-55f01326cc04f8366a451bcaa4308531281a32d4.tar.xz
util/lint/kconfig_lint: Handle glob prefix and suffix
Change-Id: I9067a95ff171d6da58583b3d4f15596b4584d937 Signed-off-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-on: https://review.coreboot.org/c/coreboot/+/36626 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Nico Huber <nico.h@gmx.de> Reviewed-by: Martin Roth <martinroth@google.com>
Diffstat (limited to 'util')
-rwxr-xr-xutil/lint/kconfig_lint9
1 files changed, 6 insertions, 3 deletions
diff --git a/util/lint/kconfig_lint b/util/lint/kconfig_lint
index 47f04941f2..1545c8299b 100755
--- a/util/lint/kconfig_lint
+++ b/util/lint/kconfig_lint
@@ -1213,9 +1213,11 @@ sub load_kconfig_file {
my @dir_file_data;
#recursively handle coreboot's new source glob operator
- if ( $input_file =~ /^(.*?)\/\*\/(.*)$/ ) {
+ if ( $input_file =~ /^(.*?)\/(\w*)\*(\w*)\/(.*)$/ ) {
my $dir_prefix = $1;
- my $dir_suffix = $2;
+ my $dir_glob_prefix = $2;
+ my $dir_glob_suffix = $3;
+ my $dir_suffix = $4;
if ( -d "$dir_prefix" ) {
opendir( D, "$dir_prefix" ) || die "Can't open directory '$dir_prefix'\n";
@@ -1225,7 +1227,8 @@ sub load_kconfig_file {
while ( my $directory = shift @dirlist ) {
#ignore non-directory files
- if ( ( -d "$dir_prefix/$directory" ) && !( $directory =~ /^\..*/ ) ) {
+ if ( ( -d "$dir_prefix/$directory" ) && !( $directory =~ /^\..*/ )
+ && ( $directory =~ /\Q$dir_glob_prefix\E.*\Q$dir_glob_suffix\E/ ) ) {
push @dir_file_data,
load_kconfig_file( "$dir_prefix/$directory/$dir_suffix",
$input_file, $loadline, 1, $loadfile, $loadline );