patch-2.1.132 linux/scripts/checkhelp.pl
Next file: linux/scripts/mkdep.c
Previous file: linux/net/wanrouter/wanmain.c
Back to the patch index
Back to the overall index
- Lines: 31
- Date:
Thu Dec 17 09:07:46 1998
- Orig file:
v2.1.131/linux/scripts/checkhelp.pl
- Orig date:
Wed Dec 31 16:00:00 1969
diff -u --recursive --new-file v2.1.131/linux/scripts/checkhelp.pl linux/scripts/checkhelp.pl
@@ -0,0 +1,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);
+}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov