diff options
author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2006-08-23 16:05:57 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2006-08-23 16:05:57 -0300 |
commit | bb8e208c1029496fce51ca45bba0f443330304cd (patch) | |
tree | 071b6f07d442d0efe0961247108c4f8f1fba1b63 | |
parent | ed97b0da67163cb14799b2b512a4e76d95ad2e7f (diff) | |
download | mediapointer-dvb-s2-bb8e208c1029496fce51ca45bba0f443330304cd.tar.gz mediapointer-dvb-s2-bb8e208c1029496fce51ca45bba0f443330304cd.tar.bz2 |
Make easier to debug: just uncommenting my $debug=1
From: Mauro Carvalho Chehab <mchehab@infradead.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
-rwxr-xr-x | v4l/scripts/make_kconfig.pl | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/v4l/scripts/make_kconfig.pl b/v4l/scripts/make_kconfig.pl index 9b2a1600f..4cd386c58 100755 --- a/v4l/scripts/make_kconfig.pl +++ b/v4l/scripts/make_kconfig.pl @@ -14,6 +14,8 @@ my $version, $level, $sublevel, $kernver; my $kernel=shift; my $force_kconfig=shift; +#my $debug=1; + #!/usr/bin/perl use FileHandle; @@ -29,7 +31,7 @@ sub process_config ($) if (m/\#define\s+CONFIG_([^ ]*)_ON_SMP\s+(.*)\n/) { my $key=$1; my $value=$2; -# printf "defined $key as $value\n"; + printf "defined $key as $value\n" if $debug; if ( $value == 1 ) { $value='y'; } @@ -39,7 +41,7 @@ sub process_config ($) if (m/\#define\s+CONFIG_([^ ]*)_MODULE\s+(.*)\n/) { my $key=$1; my $value=$2; -# printf "defined $key as $value\n"; + printf "defined $key as $value\n" if $debug; if ( $value == 1 ) { $value='m'; } @@ -49,7 +51,7 @@ sub process_config ($) if (m/\#define\s+CONFIG_([^ ]*)\s+(.*)\n/) { my $key=$1; my $value=$2; -# printf "defined $key as $value\n"; + printf "defined $key as $value\n" if $debug; if ( $value == 1 ) { $value='y'; } @@ -57,7 +59,7 @@ sub process_config ($) next; } if (m/\#undef\s+CONFIG_([^ ]*)\n/) { -# printf "undefined $1\n"; + printf "undefined $1\n" if $debug; $kernopts{$1}='n'; next; } @@ -72,7 +74,7 @@ sub add_bool($) exists $config{$arg} or die "Adding unknown boolean '$arg'"; $tristate{$arg}="bool"; -# printf "Boolean:%s\n",$arg; + printf "Boolean:%s\n",$arg if $debug; $kernopts{$arg}='y'; } @@ -179,7 +181,7 @@ sub deps_ok($) $arg=$arg." "; -# printf "$key: deps are '$arg'\n"; + printf "$key: deps are '$arg'\n" if $debug; while ($arg ne "") { if ($arg =~ m/^([A-Z0-9_]+) /) { @@ -206,13 +208,9 @@ sub open_kconfig($$) { my $disabled=0; my $key; -#print "opening $file\n"; +print "opening $file\n" if $debug; open $in,"$file" or die "File not found: $file"; while (<$in>) { -# if (m;^\s*source[\s\"]+drivers/media/(video|dvb)/Kconfig;) { -# next; -# } - # start of a new stanza, reset if (m/^\w/) { $disabled = 0; @@ -285,7 +283,7 @@ EOF print "$key requires version $minver{$key}\n"; print OUT "# $key disabled for insufficient kernel version\n"; } else { -# printf "OK: $key requires version %s\n", exists $minver{$key}?$minver{$key}:"any"; + printf "OK: $key requires version %s\n", exists $minver{$key}?$minver{$key}:"any" if $debug; $disabled=0; } } @@ -308,7 +306,7 @@ sub parse_versions () $ver = $1; } elsif (/^\s*(\w+)/) { $minver{$1} = $ver; -# print "$1=$ver\n"; + print "minimal version for $1 is $ver\n" if $debug; } } close $in; |