From: Richard Levitte Date: Fri, 4 Sep 2020 06:53:11 +0000 (+0200) Subject: Make 'make errors' work again X-Git-Tag: openssl-3.0.0-alpha7~245 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0490314f651bdd2888b7839f07c7591877e59bd5;p=thirdparty%2Fopenssl.git Make 'make errors' work again util/mkerr.pl detects if a header is now a '.in' template, and adjusts the header file it reads accordingly. Reviewed-by: Paul Dale Reviewed-by: Matt Caswell (Merged from https://github.com/openssl/openssl/pull/12781) --- diff --git a/util/mkerr.pl b/util/mkerr.pl index 44332d423ec..16ca06ef836 100755 --- a/util/mkerr.pl +++ b/util/mkerr.pl @@ -263,7 +263,9 @@ while ( ( my $hdr, my $lib ) = each %libinc ) { my $linenr = 0; my $cpp = 0; - open(IN, "<$hdr") || die "Can't open $hdr, $!,"; + open(IN, "<$hdr") + || open(IN, "<$hdr.in") + || die "Can't open $hdr or $hdr.in, $!,"; while ( ) { $linenr++; @@ -435,7 +437,6 @@ foreach my $lib ( keys %errorfile ) { # Rewrite the header file my $hfile = $hinc{$lib}; - $hfile =~ s/.h$/err.h/ if $internal; open( OUT, ">$hfile" ) || die "Can't write to $hfile, $!,"; print OUT <<"EOF"; /*