On Wed, 14 Jun 2006, Damien Bally wrote:
> mike_booth76@xxxxxxxxxxxxxx a écrit :
> > error: `CONFIG_DVB_CINERGYT2_RC_QUERY_INTERVAL' undeclared (first use in
> > this
> > function)
This patch should fix that problem.
One of my patchs made make_noconfig.pl stop putting non-boolean/tristate
options into v4l/.myconfig. myconfig is included by the v4l-dvb Makefile,
and the Makefile only cares about options set to y/n/m, not interger and
hex options. So, integer, hex and string options weren't output.
But, there is a problem! A C header file called compat-config.h is
generated from the myconfig file, using a shell script inside the Makefile.
If integer options like that CINERGYT2 one aren't in myconfig, they don't
get put into compat-config.h, and then aren't defined for the code in
cinergyT2.c that wants them.
# HG changeset patch
# User Trent Piepho <xyzzy@xxxxxxxxxxxxx>
# Node ID 4e1bd8f5c36d06a143d0138336adafe4d9e669e9
# Parent fe3622dc3fa9cc2c44a6224c8c0a6856d56eae04
integer/hex/string options need to appear in .myconfig
From: Trent Piepho <xyzzy@xxxxxxxxxxxxx>
integer/hex/string options were getting omitted from .myconfig, produced
by make_noconfig.pl. They don't need to be there for the Makefile that
includes .myconfig, it only uses the bool/tristate options. They need to
be there for compat-config.h, which is generated from .myconfig and so
will only have the #define statements for options that appear in .myconfig.
Signed-off-by: Trent Piepho <xyzzy@xxxxxxxxxxxxx>
diff -r fe3622dc3fa9 -r 4e1bd8f5c36d v4l/scripts/make_noconfig.pl
--- a/v4l/scripts/make_noconfig.pl Wed Jun 14 20:35:36 2006 -0700
+++ b/v4l/scripts/make_noconfig.pl Thu Jun 15 02:58:34 2006 -0700
@@ -1,4 +1,12 @@
#!/usr/bin/perl
+
+# The purpose of this script is to produce a file named '.myconfig', in
+# the same style as the '.config' file. Except .myconfig has disabled
+# options explicitly set to 'n' rather than just omitted. This is to
+# make sure they override any corresponding options that may be turned on
+# in the Kernel's config files.
+# The .myconfig file is what will be included in the v4l-dvb Makefile
+# to control which drivers are built.
my %config = ();
my %allconfig = ();
@@ -13,9 +21,11 @@ close IN;
close IN;
# Build table of _all_ bool and tristate config variables
+my $key = 0;
open IN,"Kconfig";
while (<IN>) {
if (/^config\s+(\w+)\s*$/) {
+ $key == 0 or die "Couldn't find type of config '$key'";
$key = "CONFIG_$1";
} elsif (/^\s+bool(ean)?\s/) {
$allconfig{$key} = 'bool';
@@ -23,18 +33,26 @@ while (<IN>) {
} elsif (/^\s+tristate\s/) {
$allconfig{$key} = 'tristate';
$key = 0;
+ } elsif (/^\s+(int|hex|string)\s/) {
+ $allconfig{$key} = 'data';
+ $key = 0;
}
- # else, must be int or string, ignore
}
close IN;
exists $allconfig{0} and die "Unable to correctly parse Kconfig file";
# Produce output for including in a Makefile
-# Explicitly set options that didn't appear in .config to n
+# Explicitly set bool/tri options that didn't appear in .config to n
+# 'data' options are only output if they appeared in .config
open OUT,">.myconfig";
while ( my ($key, $value) = each(%allconfig) ) {
- $value = exists $config{$key} ? $config{$key} : 'n';
+ if ($value eq 'data') {
+ next unless (exists $config{$key});
+ $value = $config{$key};
+ } else {
+ $value = exists $config{$key} ? $config{$key} : 'n';
+ }
printf OUT "%-44s := %s\n",$key,$value;
}
close OUT;
_______________________________________________
linux-dvb@xxxxxxxxxxx
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb