checkhelp.pl
上传用户:jlfgdled
上传日期:2013-04-10
资源大小:33168k
文件大小:1k
- #!/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.helpn" 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 "$namen$whatn No help for $whatnn";
- $nohelp{$what}=1;
- }
- }
- }
- close (FILE);
- }