diff options
author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2006-04-25 18:20:44 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2006-04-25 18:20:44 -0300 |
commit | 6a6a2d0070d94c04bdb2961a143fd516753464f0 (patch) | |
tree | 894c2298b435e80be1901f88f0c3a7f606480ab3 /v4l/scripts/make_kconfig.pl | |
parent | d51c5dc0968d35384c2ee7960018457e81f72970 (diff) | |
download | mediapointer-dvb-s2-6a6a2d0070d94c04bdb2961a143fd516753464f0.tar.gz mediapointer-dvb-s2-6a6a2d0070d94c04bdb2961a143fd516753464f0.tar.bz2 |
Improves V4L/DVB in-tree building
From: Mauro Carvalho Chehab <mchehab@infradead.org>
Now, make_kconfig.sh will check for boolean/tristate config
vars and handle it properly.
Also, make allyesconfig/allmodconfig will use make_kconfig.sh
to generate .myconfig instead of conf -m. This way, make all will
not require priviledges at kernel tree.
write access to kernel tree is still required for make menuconfig/
make xconfig/make qconfig.
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'v4l/scripts/make_kconfig.pl')
-rwxr-xr-x | v4l/scripts/make_kconfig.pl | 46 |
1 files changed, 44 insertions, 2 deletions
diff --git a/v4l/scripts/make_kconfig.pl b/v4l/scripts/make_kconfig.pl index b1d6f5d53..11392c32d 100755 --- a/v4l/scripts/make_kconfig.pl +++ b/v4l/scripts/make_kconfig.pl @@ -4,8 +4,27 @@ use FileHandle; my %depend = (); my %minver = (); my %config = (); +my %tristate = (); my $version, $level, $sublevel; +my $force_kconfig=shift; + +sub add_bool($) +{ + my $arg=shift; + + $tristate{$arg}="bool"; + printf "Boolean:%s\n",$arg; +} + +sub add_tristate($) +{ + my $arg=shift; + + $tristate{$arg}="tristate"; + printf "Tristate:%s\n",$arg; +} + sub add_config($) { my $arg=shift; @@ -34,6 +53,7 @@ sub open_kconfig($$) { my ($dir,$file)=@_; my $in = new FileHandle; my $skip=0; + my $key; #print "opening $file\n"; open $in,"$file"; @@ -51,9 +71,14 @@ sub open_kconfig($$) { if (m|^\s+select (.*)\n|) { check_deps ($1); } + if (m|^\s*bool\s+|) { + add_bool($key); + } + if (m|^\s*tristate\s+|) { + add_tristate($key); + } if (m|^\s*config (.*)\n|) { - my $key=$1; - + $key=$1; add_config ($1); my $min=$minver { $key }; @@ -139,9 +164,26 @@ while ( my ($key, $value) = each(%config) ) { open OUT,">Kconfig.kern"; print OUT "config MODULES\n\tboolean\n\tdefault y\n\n"; +$tristate{"MODULES"}="bool"; while ( my ($key, $value) = each(%depend) ) { print OUT "# $key with $value refs\nconfig $key\n\ttristate\n\tdefault m\n\n"; } close OUT; +if (($force_kconfig eq 1) || !open IN,".config") { + open OUT,">.config"; + while ( my ($key,$value) = each(%tristate) ) { + + if ($key eq "DVB_AV7110_FIRMWARE") { + printf OUT "CONFIG_%s=n\n",$key; + } else { + if ($value eq "tristate") { + printf OUT "CONFIG_%s=m\n",$key; + } else { + printf OUT "CONFIG_%s=y\n",$key; + } + } + } + close OUT; +} |