Checkhelp.pl modifications

Alan Cox (alan@lxorguk.ukuu.org.uk)
Sun, 22 Nov 98 19:23 GMT


Knowning which help entries need changing is part of the battle. However
to fix them you then need to tediously look up all the names and format stuff

This mod to the checkhelp.pl makes it output valid Documentation/Configure.help
format data ready to be filled in. Much more useful IMHO. No guarantees, Im
not a perl programmer :)

Alan

#!/usr/bin/perl
# checkhelp.pl - finds configuration options that have no
# corresponding section in the help file
#
# made by Meelis Roos (mroos@tartu.cyber.ee)

# read the help file
@options=split /\n/, `grep '^CONFIG' Documentation/Configure.help`;
die "Can't read Documentation/Configure.help\n" if $#options == -1;

#read all the files
foreach $file (@ARGV)
{
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*)/) {
$what=$3;
$name=$2;
s/$3//;
@found = grep (/$what$/, @options);
if ($#found == -1) {
next if $nohelp{$what};
print "$name\n$what\n No help for $what\n\n";
$nohelp{$what}=1;
}
}
}
close (FILE);
}

-
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/