checkhelp.pl
上传用户:jlfgdled
上传日期:2013-04-10
资源大小:33168k
文件大小:1k
源码类别:

Linux/Unix编程

开发平台:

Unix_Linux

  1. #!/usr/bin/perl
  2. # checkhelp.pl - finds configuration options that have no
  3. #                corresponding section in the help file
  4. #
  5. # made by Meelis Roos (mroos@tartu.cyber.ee)
  6. # read the help file
  7. @options=split /n/, `grep '^CONFIG' Documentation/Configure.help`;
  8. die "Can't read Documentation/Configure.helpn" if $#options == -1;
  9. #read all the files
  10. foreach $file (@ARGV)
  11. {
  12. open (FILE, $file) || die "Can't open $file: $!n";
  13. while (<FILE>) {
  14. # repeat until no CONFIG_* are left
  15. while (/^s*(bool|tristate|dep_tristate|string|int|hex).*' *(.*)'.*(CONFIG_w*)/) {
  16. $what=$3;
  17. $name=$2;
  18. s/$3//;
  19. @found = grep (/$what$/, @options);
  20. if ($#found == -1) {
  21. next if $nohelp{$what};
  22. print "$namen$whatn  No help for $whatnn";
  23. $nohelp{$what}=1;
  24. }
  25. }
  26. }
  27. close (FILE);
  28. }