summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTrent Piepho <xyzzy@speakeasy.org>2006-08-31 16:45:45 -0700
committerTrent Piepho <xyzzy@speakeasy.org>2006-08-31 16:45:45 -0700
commit8901e0b0d666fb60b875ff0f11dec7e8d8ef49b7 (patch)
treefc632fd3abb111b0b4b76d6d72385425bc5fc79a
parent1c0985b4acc14b1123364641d351d9186939f29c (diff)
downloadmediapointer-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-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>) {