summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xv4l/scripts/make_kconfig.pl23
1 files changed, 23 insertions, 0 deletions
diff --git a/v4l/scripts/make_kconfig.pl b/v4l/scripts/make_kconfig.pl
index 04430ccf2..a95e4512a 100755
--- a/v4l/scripts/make_kconfig.pl
+++ b/v4l/scripts/make_kconfig.pl
@@ -4,6 +4,7 @@ use FileHandle;
my %depend = ();
my %minver = ();
my %config = ();
+my %intopt = ();
my %tristate = ();
my $version, $level, $sublevel;
@@ -25,6 +26,19 @@ sub add_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($)
{
my $arg=shift;
@@ -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);
@@ -185,5 +205,8 @@ if (($force_kconfig eq 1) || !open IN,".config") {
}
}
}
+ while ( my ($key,$value) = each(%intopt) ) {
+ print OUT "CONFIG_$key=$value\n";
+ }
close OUT;
}