summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xv4l/scripts/make_makefile.pl6
1 files changed, 6 insertions, 0 deletions
diff --git a/v4l/scripts/make_makefile.pl b/v4l/scripts/make_makefile.pl
index f49edb0f8..e1e08b578 100755
--- a/v4l/scripts/make_makefile.pl
+++ b/v4l/scripts/make_makefile.pl
@@ -75,10 +75,16 @@ sub open_makefile($) {
my $in = new FileHandle;
my $orig;
+ # only open a given Makefile once
+ return if exists $makefiles{$file};
+ $makefiles{$file} = 1;
+
$file =~ m|^(.*)/[^/]*$|;
my $dir = $1;
# print STDERR "opening $file (dir=$dir)\n";
+ $file =~ m|.*/(linux/.*)$|;
+ print OUT "# Including $1\n";
open $in, $file;
while (<$in>) {