From: Richard Levitte Date: Sun, 31 Jan 2016 10:51:07 +0000 (+0100) Subject: Don't go into dotted directories when copying Makefile.in to Makefile X-Git-Tag: OpenSSL_1_1_0-pre3~349 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=fb36ca1290e10dfbefc9856e19fdcb3a0ad83f0f;p=oweals%2Fopenssl.git Don't go into dotted directories when copying Makefile.in to Makefile Reviewed-by: Rich Salz --- diff --git a/Configure b/Configure index 9a9b92a773..4dca9a9e1d 100755 --- a/Configure +++ b/Configure @@ -1297,23 +1297,30 @@ foreach my $alg ( 'bn' ) { # Copy all Makefile.in to Makefile (except top-level) use File::Find; use IO::File; -find(sub { - return if ($_ ne "Makefile.in" || $File::Find::dir eq "."); - my $in = IO::File->new($_, "r") or - die sprintf "Error reading Makefile.in in %s: !$\n", +find( + { + preprocess => sub { + grep(!/^\./, @_); + }, + wanted => sub { + return if ($_ ne "Makefile.in" || $File::Find::dir eq "."); + my $in = IO::File->new($_, "r") or + die sprintf "Error reading Makefile.in in %s: !$\n", $File::Find::dir; - my $out = IO::File->new("Makefile", "w") or - die sprintf "Error writing Makefile in %s: !$\n", + my $out = IO::File->new("Makefile", "w") or + die sprintf "Error writing Makefile in %s: !$\n", $File::Find::dir; - print $out "# Generated from $_, do not edit\n"; - while (my $line = <$in>) { print $out $line } - $in->close() or - die sprintf "Error reading Makefile.in in %s: !$\n", + print $out "# Generated from $_, do not edit\n"; + while (my $line = <$in>) { print $out $line } + $in->close() or + die sprintf "Error reading Makefile.in in %s: !$\n", $File::Find::dir; - $out->close() or - die sprintf "Error writing Makefile in %s: !$\n", + $out->close() or + die sprintf "Error writing Makefile in %s: !$\n", $File::Find::dir; - }, "."); + }, + }, + "."); my %builders = ( unixmake => sub {