Merge pull request #6893 from tom-daubney-arm/modify_generate_errors_script

Make generate_errors.pl handle directory names containing spaces when opening files
This commit is contained in:
Gilles Peskine 2023-01-10 22:09:58 +01:00 committed by GitHub
commit f9c8d76db6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 2 deletions

View file

@ -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.

View file

@ -60,11 +60,11 @@ open(FORMAT_FILE, '<:crlf', "$error_format_file") or die "Opening error format f
my $error_format = <FORMAT_FILE>;
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 = <FILE>;
close FILE;
my $found = 0;