[patch] make checkhelp correction

Meelis Roos (mroos@tartu.cyber.ee)
Mon, 28 Dec 1998 20:18:32 +0200 (EET)


This patch adds the recognition of the 'choice' command to checkhelp.
This btw finds that the new PCI config changes have not been documented
in Configure.help.

--- linux/scripts/checkhelp.old Mon Dec 28 17:31:15 1998
+++ linux/scripts/checkhelp.pl Mon Dec 28 20:10:24 1998
@@ -11,19 +11,32 @@
#read all the files
foreach $file (@ARGV)
{
+ $choice='';
open (FILE, $file) || die "Can't open $file: $!\n";
while (<FILE>) {
- # repeat until no CONFIG_* are left
- while (/^\s*(bool|tristate|dep_tristate|string|int|hex).*' *(.*)'.*(CONFIG_\w*)/) {
+ if (!$choice && /^\s*(bool|tristate|dep_tristate|string|int|hex).*'\s*(.*)'.*(CONFIG_\w*)/) {
$what=$3;
$name=$2;
- s/$3//;
@found = grep (/$what$/, @options);
- if ($#found == -1) {
- next if $nohelp{$what};
+ if ($#found == -1 && !$nohelp{$what}) {
print "$name\n$what\n No help for $what\n\n";
$nohelp{$what}=1;
}
+ } elsif (!$choice && /^\s*choice\s+'\s*(.*)'\s+\\/) {
+ # first line of a choice construction
+ $choice=$1;
+ } elsif ($choice) {
+ # next line of a choice construction
+ if (/\s*"?(\w+)\s+(CONFIG_[^\s"]+)"?\s+/) {
+ $what=$2;
+ $name=$choice;
+ @found = grep (/$what$/, @options);
+ if ($#found == -1 && !$nohelp{$what}) {
+ print "$name\n$what\n No help for $what\n\n";
+ $nohelp{$what}=1;
+ }
+ $choice='';
+ }
}
}
close (FILE);

-- 
Meelis Roos (mroos@tartu.cyber.ee)

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/