summaryrefslogtreecommitdiff
path: root/v4l/scripts/make_kconfig.pl
diff options
context:
space:
mode:
authorMichael Krufky <mkrufky@linuxtv.org>2006-03-16 20:37:51 -0500
committerMichael Krufky <mkrufky@linuxtv.org>2006-03-16 20:37:51 -0500
commitd30a31decd05aa55764418cce0b9cce695885439 (patch)
tree8fffef97b8b6d19639ed547eb7d6253b0f336e48 /v4l/scripts/make_kconfig.pl
parente0449a4964c2aec77cf02c33d2a9375b647530ce (diff)
parent32027c8007a8b9e82f70f5eb52387db827ff8b2d (diff)
downloadmediapointer-dvb-s2-d30a31decd05aa55764418cce0b9cce695885439.tar.gz
mediapointer-dvb-s2-d30a31decd05aa55764418cce0b9cce695885439.tar.bz2
merged ~mkrufky/pending
From: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Diffstat (limited to 'v4l/scripts/make_kconfig.pl')
-rwxr-xr-xv4l/scripts/make_kconfig.pl37
1 files changed, 37 insertions, 0 deletions
diff --git a/v4l/scripts/make_kconfig.pl b/v4l/scripts/make_kconfig.pl
new file mode 100755
index 000000000..f612e83db
--- /dev/null
+++ b/v4l/scripts/make_kconfig.pl
@@ -0,0 +1,37 @@
+#!/usr/bin/perl
+use FileHandle;
+
+my $KDIR=shift;
+my $ARCH=shift;
+
+sub open_kconfig($$) {
+ my ($dir,$file)=@_;
+ my $in = new FileHandle;
+
+print "opening $file\n";
+ open $in,"$file";
+ while (<$in>) {
+ if (m;^\s*source[\s\"]+drivers/media/(video|dvb)/Kconfig;) {
+ next;
+ }
+ if (m|^\s*source[\s\"]+([^\n\s\"]+)[\n\s\"]|) {
+ open_kconfig($dir,"$dir/$1");
+ next;
+ }
+ s/^main(menu\s\"[^\"]+)/\1 - DON'T CHANGE IT!/;
+ print OUT $_;
+ }
+ close $in;
+}
+
+open OUT,">Kconfig.kern";
+open_kconfig($KDIR,"$KDIR/arch/$ARCH/Kconfig");
+print OUT "endmenu\n";
+close OUT;
+
+open OUT,">Kconfig";
+print OUT "mainmenu \"V4L/DVB menu\"\n";
+open_kconfig ("../linux","../linux/drivers/media/video/Kconfig");
+open_kconfig ("../linux","../linux/drivers/media/dvb/Kconfig");
+print OUT "source Kconfig.kern\n";
+close OUT;