summaryrefslogtreecommitdiff
path: root/v4l/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'v4l/scripts')
-rw-r--r--v4l/scripts/gentree.pl12
1 files changed, 8 insertions, 4 deletions
diff --git a/v4l/scripts/gentree.pl b/v4l/scripts/gentree.pl
index 7c044ee06..74db9f1ad 100644
--- a/v4l/scripts/gentree.pl
+++ b/v4l/scripts/gentree.pl
@@ -67,10 +67,6 @@ sub filter_source ($$) {
print STDERR "File: $in, for kernel $VERSION($CODE)/\n" if $DEBUG;
while ($line = <IN>) {
- if ($line =~ m/^#include <linux\/version.h>/ &&
- $in =~ m/.*\.c/) {
- next;
- }
if ($line =~ m/^#include \"compat.h\"/) {
next;
}
@@ -93,6 +89,14 @@ sub filter_source ($$) {
$level++;
next;
}
+ if ($line =~ /^#if 0\s.*[Kk][Ee][Ee][Pp].*/) {
+ chomp($line);
+ $state{$level} = "ifother";
+ $if{$level} = 0;
+ print STDERR "/* BP #if 0 (keep) state=$state{$level} if=$if{$level} level=$level ($line) */\n" if $DEBUG;
+ $level++;
+ next;
+ }
if ($line =~ /^#if 1\s.*[Kk][Ee][Ee][Pp].*/) {
print OUT "#if 1\n";
$state{$level} = "ifother";