File: checkhelp.pl

package info (click to toggle)
kernel-source-2.4.27 2.4.27-10sarge5
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 191,224 kB
  • ctags: 610,077
  • sloc: ansic: 3,299,602; asm: 164,708; makefile: 10,962; sh: 3,725; perl: 2,273; yacc: 1,651; cpp: 820; lex: 752; tcl: 577; awk: 251; lisp: 218; sed: 79
file content (30 lines) | stat: -rw-r--r-- 805 bytes parent folder | download | duplicates (17)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/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);
}