[PATCH] make allyesconfig doesn't work, fix it

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The .config file generated by make allyesconfig doesn't work, a couple
drivers won't compile with it.  They need some integer Kconfig
variables set in order to compile, and make_kconfig.pl just ignores
integer variables.

This patch will make the .config file generated by make_kconfig.pl
work to compile all the drivers.  It outputs integer variables to
.config set to their default value.
# HG changeset patch
# User Trent Piepho <xyzzy@xxxxxxxxxxxxx>
# Node ID cfd110814b56653505472abd0f983f3a6d68c3ae
# Parent  596cb93d9c5edc065e4690192d8350106031d4e0
Have make_kconfig.pl output int config vars with their default value

From: Trent Piepho <xyzzy@xxxxxxxxxxxxx>

A few drivers have integer config variables defined in their Kconfig file
which must be set for them to compile.  make_kconfig.pl would just ignore int
variables and not put them into .config at all.  This change will put them
into .config set to their default values.

Signed-off-by: Trent Piepho <xyzzy@xxxxxxxxxxxxx>

diff -r 596cb93d9c5e -r cfd110814b56 v4l/scripts/make_kconfig.pl
--- a/v4l/scripts/make_kconfig.pl	Wed May 17 17:15:17 2006 -0700
+++ b/v4l/scripts/make_kconfig.pl	Wed May 17 19:27:58 2006 -0700
@@ -4,6 +4,7 @@ my %depend = ();
 my %depend = ();
 my %minver = ();
 my %config = ();
+my %intopt = ();
 my %tristate = ();
 my $version, $level, $sublevel;
 
@@ -23,6 +24,19 @@ sub add_tristate($)
 
 	$tristate{$arg}="tristate";
 #	printf "Tristate:%s\n",$arg;
+}
+
+sub add_int($)
+{
+	$intopt{$_[0]} = '0';
+}
+
+sub set_int_value($$)
+{
+	my $key = shift;
+	my $val = shift;
+
+	$intopt{$key} = $val;
 }
 
 sub add_config($)
@@ -77,6 +91,12 @@ sub open_kconfig($$) {
 		if (m|^\s*tristate\s+|) {
 			add_tristate($key);
 		}
+		if (m|^\s*int\s|) {
+			add_int($key);
+		}
+		if (m|^\s*default "(\d+)"| && exists $intopt{$key}) {
+			set_int_value($key, $1);
+		}
 		if (m|^\s*config (.*)\n|) {
 			$key=$1;
 			add_config ($1);
@@ -188,5 +208,8 @@ if (($force_kconfig eq 1) || !open IN,".
 			}
 		}
 	}
+	while ( my ($key,$value) = each(%intopt) ) {
+		print OUT "CONFIG_$key=$value\n";
+	}
 	close OUT;
 }
_______________________________________________

linux-dvb@xxxxxxxxxxx
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb

[Index of Archives]     [Linux Media]     [Video 4 Linux]     [Asterisk]     [Samba]     [Xorg]     [Xfree86]     [Linux USB]

  Powered by Linux