summaryrefslogtreecommitdiff
path: root/v4l/scripts
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2009-09-14 16:21:53 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-09-14 16:21:53 -0300
commitf7eb0f58685eeff5c650e8f56f04064954fff087 (patch)
treee7b15f340be99930a27881ccf6aebb9dcd3e2cf6 /v4l/scripts
parent8cdbcfff94841040078b0f53189040cd4861eb2f (diff)
downloadmediapointer-dvb-s2-f7eb0f58685eeff5c650e8f56f04064954fff087.tar.gz
mediapointer-dvb-s2-f7eb0f58685eeff5c650e8f56f04064954fff087.tar.bz2
build: Don't copy data for staging builds
From: Mauro Carvalho Chehab <mchehab@redhat.com> Having to copy all changes at staging Kconfig and Makefile's are unmaintainable. Instead, auto-generate Makefiles via script. In the case of Kconfig, however, since we may have broken drivers, it is better to just include the staging Kconfig sources at the proper places. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'v4l/scripts')
-rwxr-xr-xv4l/scripts/make_makefile.pl18
1 files changed, 17 insertions, 1 deletions
diff --git a/v4l/scripts/make_makefile.pl b/v4l/scripts/make_makefile.pl
index 35ab7dddf..b49f960d1 100755
--- a/v4l/scripts/make_makefile.pl
+++ b/v4l/scripts/make_makefile.pl
@@ -1,5 +1,6 @@
#!/usr/bin/perl
use FileHandle;
+use File::Find;
my %instdir = ();
@@ -185,11 +186,23 @@ sub removeubuntu()
print OUT " fi\n";
}
+sub parse_dir()
+{
+ my $file = $File::Find::name;
+
+ return if (!($file =~ /Makefile$/));
+ open_makefile($file);
+}
+
+##############################################################################
+
getobsolete();
open OUT, '>Makefile.media' or die 'Unable to write Makefile.media';
open_makefile('../linux/drivers/media/Makefile');
+find({wanted => \&parse_dir, no_chdir => 1}, '../linux/drivers/staging');
+
# Creating Install rule
print OUT "media-install::\n";
@@ -234,9 +247,12 @@ while ( my ($dir, $files) = each(%instdir) ) {
print OUT " rm \$(DESTDIR)\$(KDIR26)/$dir/\$\$i.gz; fi; done; echo;\n\n";
}
+my $mediadeps = join(" \\\n", map("\t../linux/drivers/media/$_/Makefile", keys %instdir));
+$mediadeps =~ s,\.\./linux/drivers/media/\.\.,..,g;
+
# Print dependencies of Makefile.media
print OUT "Makefile.media: ../linux/drivers/media/Makefile \\\n";
print OUT "\tobsolete.txt \\\n";
-print OUT join(" \\\n", map("\t../linux/drivers/media/$_/Makefile", keys %instdir));
+print OUT $mediadeps;
print OUT "\n";
close OUT;