summaryrefslogtreecommitdiff
path: root/v4l/scripts
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2009-03-13 20:17:47 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-03-13 20:17:47 -0300
commit675d7080a5676f235b39a78a0af9d6a32b589133 (patch)
treefff786e9e33cd9c182e22f8bb8c67a92fb3ad63e /v4l/scripts
parent3e0273a7209d6a20bd422beec8b46dd6b79a00a7 (diff)
parenteb97af7a1c842f6958f57fe8f9dbd93471d17948 (diff)
downloadmediapointer-dvb-s2-675d7080a5676f235b39a78a0af9d6a32b589133.tar.gz
mediapointer-dvb-s2-675d7080a5676f235b39a78a0af9d6a32b589133.tar.bz2
merge: http://linuxtv.org/hg/~gliakhovetski/v4l-dvb
From: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'v4l/scripts')
-rwxr-xr-xv4l/scripts/make_kconfig.pl13
1 files changed, 9 insertions, 4 deletions
diff --git a/v4l/scripts/make_kconfig.pl b/v4l/scripts/make_kconfig.pl
index 57c663c00..8683ee4d8 100755
--- a/v4l/scripts/make_kconfig.pl
+++ b/v4l/scripts/make_kconfig.pl
@@ -277,11 +277,13 @@ sub open_kconfig($$) {
my $in_help = 0;
my $default_seen = 0;
my $if;
+ my $line;
print "Opening $file\n" if $debug;
open $in, '<', $file or die "File not found: $file";
push @kconfigfiles, $file;
while (<$in>) {
+ $line = $_;
# In our Kconfig files, the first non-help line after the
# help text always has no indention. Technically, the
# help text is ended by just by the indention decreasing,
@@ -303,7 +305,7 @@ sub open_kconfig($$) {
print OUT "\tdefault n\n";
}
print OUT "\tdepends on VIDEO_KERNEL_VERSION\n";
- $_ = sprintf($disabled_msg, $minver{$key});
+ $line = sprintf($disabled_msg, $minver{$key});
}
next;
}
@@ -319,10 +321,13 @@ sub open_kconfig($$) {
}
next if (/^\s*#/ || /^\s*$/); # skip comments and blank lines
+ # Erase any comments on this line
+ s/(?<!\\)#(.*)$//;
+
if (m|^\s*source\s+"([^"]+)"\s*$| ||
m|^\s*source\s+(\S+)\s*$|) {
open_kconfig($dir, "$dir/$1");
- $_ = ''; # don't print the source line itself
+ $line = ''; # don't print the source line itself
next;
}
@@ -453,13 +458,13 @@ sub open_kconfig($$) {
if ($disabled) {
$default_seen = 1;
- $_ = "\tdefault n\n";
+ $line = "\tdefault n\n";
}
} else {
print "Skipping $file:$. $_" if $debug;
}
} continue {
- print OUT $_;
+ print OUT $line;
}
close $in;
}