diff options
author | Trent Piepho <xyzzy@speakeasy.org> | 2006-08-31 16:45:45 -0700 |
---|---|---|
committer | Trent Piepho <xyzzy@speakeasy.org> | 2006-08-31 16:45:45 -0700 |
commit | 8901e0b0d666fb60b875ff0f11dec7e8d8ef49b7 (patch) | |
tree | fc632fd3abb111b0b4b76d6d72385425bc5fc79a | |
parent | 1c0985b4acc14b1123364641d351d9186939f29c (diff) | |
download | mediapointer-dvb-s2-8901e0b0d666fb60b875ff0f11dec7e8d8ef49b7.tar.gz mediapointer-dvb-s2-8901e0b0d666fb60b875ff0f11dec7e8d8ef49b7.tar.bz2 |
Only include Makefiles once
From: Trent Piepho <xyzzy@speakeasy.org>
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 <xyzzy@speakeasy.org>
-rwxr-xr-x | v4l/scripts/make_makefile.pl | 6 |
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>) { |