summaryrefslogtreecommitdiff
path: root/v4l/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'v4l/scripts')
-rwxr-xr-xv4l/scripts/make_kconfig.pl21
1 files changed, 19 insertions, 2 deletions
diff --git a/v4l/scripts/make_kconfig.pl b/v4l/scripts/make_kconfig.pl
index 066df6a0e..a9db697e9 100755
--- a/v4l/scripts/make_kconfig.pl
+++ b/v4l/scripts/make_kconfig.pl
@@ -182,14 +182,25 @@ sub deps_ok($)
return $ok;
}
+# List of all kconfig files read in, could be used to make dependencies
+# for the output combined Kconfig file.
+my @kconfigfiles = ();
+
+# Read and parse a Kconfig file. First base of source directory tree the
+# second is the file (with path). Recursivly parses Kconfig files from
+# 'source' directives.
+
+# Prints to OUT a combined version of all the Kconfig files. This file
+# is edited slightly to disable options that need a newer kernel.
sub open_kconfig($$) {
my ($dir,$file)=@_;
my $in = new FileHandle;
my $disabled=0;
my $key;
-print "opening $file\n" if $debug;
- open $in,"$file" or die "File not found: $file";
+ print "Opening $file\n" if $debug;
+ open $in, "$file" or die "File not found: $file";
+ push @kconfigfiles, $file;
while (<$in>) {
# start of a new stanza, reset
if (m/^\w/) {
@@ -367,6 +378,12 @@ open_kconfig (".","./Kconfig.sound");
print OUT "source Kconfig.sound\n";
close OUT;
+# Create make dependency rule for the Kconfig
+open OUT, '>.kconfig.dep' or die "Cannot write .kconfig.dep";
+print OUT "Kconfig: ";
+print OUT join(" \\\n\t", @kconfigfiles), "\n";
+close OUT;
+
while ( my ($key, $value) = each(%config) ) {
delete $depend{$key};
}