From 8901e0b0d666fb60b875ff0f11dec7e8d8ef49b7 Mon Sep 17 00:00:00 2001 From: Trent Piepho Date: Thu, 31 Aug 2006 16:45:45 -0700 Subject: Only include Makefiles once From: Trent Piepho The script which combines the individual Makefils into Makefile.media would include a Makefile each time it was referenced. This caused some Makefiles to get included multiple times. Also print comments in Makefile.media with the names of the Makefiles that are being included. Signed-off-by: Trent Piepho --- v4l/scripts/make_makefile.pl | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'v4l') 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>) { -- cgit v1.2.3