Don't go into dotted directories when copying Makefile.in to Makefile
authorRichard Levitte <levitte@openssl.org>
Sun, 31 Jan 2016 10:51:07 +0000 (11:51 +0100)
committerRichard Levitte <levitte@openssl.org>
Sun, 31 Jan 2016 11:49:36 +0000 (12:49 +0100)
Reviewed-by: Rich Salz <rsalz@openssl.org>
Configure

index 9a9b92a7739fb18ceffac9182b2ffd493290305e..4dca9a9e1dbe9de267195af451f73c2ddee3a597 100755 (executable)
--- 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;
 # 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;
                 $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;
                 $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;
                 $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;
                 $File::Find::dir;
-    }, ".");
+        },
+    },
+    ".");
 
 my %builders = (
     unixmake => sub {
 
 my %builders = (
     unixmake => sub {