From 33878ed30b75a46a68f95126cfb9511bffe3e468 Mon Sep 17 00:00:00 2001 From: Thomas Daubney Date: Mon, 9 Jan 2023 18:17:02 +0000 Subject: [PATCH 1/2] Modify generate errors script Modify generate_errors.pl such that it can now handle opening files where the file path includes a directory name containing spaces. Raised in issue #6879. Fix provided by @tom-cosgrove-arm in aforementioned issue. Signed-off-by: Thomas Daubney --- scripts/generate_errors.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/generate_errors.pl b/scripts/generate_errors.pl index 5395abf41..878cfba33 100755 --- a/scripts/generate_errors.pl +++ b/scripts/generate_errors.pl @@ -60,11 +60,11 @@ open(FORMAT_FILE, '<:crlf', "$error_format_file") or die "Opening error format f my $error_format = ; close(FORMAT_FILE); -my @files = <$include_dir/*.h>; +my @files = glob qq("$include_dir/*.h"); my @necessary_include_files; my @matches; foreach my $file (@files) { - open(FILE, '<:crlf', "$file"); + open(FILE, '<:crlf', $file) or die("$0: $file: $!"); my $content = ; close FILE; my $found = 0; From 1efe4a874dacbdef02df9a0b2980ea197451dddc Mon Sep 17 00:00:00 2001 From: Thomas Daubney Date: Mon, 9 Jan 2023 18:35:40 +0000 Subject: [PATCH 2/2] Add ChangeLog entry Add ChangeLog entry documenting bugfix. Signed-off-by: Thomas Daubney --- .../fix_build_for_directory_names_containing_spaces.txt | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 ChangeLog.d/fix_build_for_directory_names_containing_spaces.txt diff --git a/ChangeLog.d/fix_build_for_directory_names_containing_spaces.txt b/ChangeLog.d/fix_build_for_directory_names_containing_spaces.txt new file mode 100644 index 000000000..e7643b703 --- /dev/null +++ b/ChangeLog.d/fix_build_for_directory_names_containing_spaces.txt @@ -0,0 +1,4 @@ +Bugfix + * Fix a bug in the build where directory names containing spaces were + causing generate_errors.pl to error out resulting in a build failure. + Fixes issue #6879.