blob: f612e83dbc1179592df5e9ded3326f0fa7cc56a3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
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;
|