diff options
author | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2006-05-04 11:38:33 +0000 |
---|---|---|
committer | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2006-05-04 11:38:33 +0000 |
commit | 3916b2a560cadab2a6e97aff0d170ec4de88f0ab (patch) | |
tree | 673ba15680a0f72ef17c0a84940bc0430f205912 | |
parent | 7c94bed2345008b4b62014a846488319a7af0727 (diff) | |
download | busybox-w32-3916b2a560cadab2a6e97aff0d170ec4de88f0ab.tar.gz busybox-w32-3916b2a560cadab2a6e97aff0d170ec4de88f0ab.tar.bz2 busybox-w32-3916b2a560cadab2a6e97aff0d170ec4de88f0ab.zip |
- add script to check for missing help entries of config options
Currently we have these errors:
./modutils/Config.in: No helptext for 'CONFIG_FEATURE_QUERY_MODULE_INTERFACE'
./networking/Config.in: No helptext for 'CONFIG_IPADDR'
./networking/Config.in: No helptext for 'CONFIG_IPLINK'
./networking/Config.in: No helptext for 'CONFIG_IPROUTE'
./networking/Config.in: No helptext for 'CONFIG_IPTUNNEL'
./coreutils/Config.in: No helptext for 'CONFIG_UNIX2DOS'
-rw-r--r-- | Makefile | 5 | ||||
-rwxr-xr-x | scripts/checkhelp.awk | 37 |
2 files changed, 42 insertions, 0 deletions
@@ -133,6 +133,7 @@ help: | |||
133 | @echo | 133 | @echo |
134 | @echo 'Development:' | 134 | @echo 'Development:' |
135 | @echo ' check - run the test suite for all applets' | 135 | @echo ' check - run the test suite for all applets' |
136 | @echo ' checkhelp - check for missing help-entries in Config.in' | ||
136 | @echo ' randconfig - generate a random configuration' | 137 | @echo ' randconfig - generate a random configuration' |
137 | @echo ' release - create a distribution tarball' | 138 | @echo ' release - create a distribution tarball' |
138 | @echo ' sizes - show size of all enabled busybox symbols' | 139 | @echo ' sizes - show size of all enabled busybox symbols' |
@@ -350,6 +351,10 @@ check test: busybox | |||
350 | bindir=$(top_builddir) srcdir=$(top_srcdir)/testsuite \ | 351 | bindir=$(top_builddir) srcdir=$(top_srcdir)/testsuite \ |
351 | $(top_srcdir)/testsuite/runtest $(CHECK_VERBOSE) | 352 | $(top_srcdir)/testsuite/runtest $(CHECK_VERBOSE) |
352 | 353 | ||
354 | .PHONY: checkhelp | ||
355 | checkhelp: | ||
356 | $(Q)$(top_srcdir)/scripts/checkhelp.awk \ | ||
357 | $(wildcard $(patsubst %,%/Config.in,$(SRC_DIRS) ./)) | ||
353 | .PHONY: sizes | 358 | .PHONY: sizes |
354 | sizes: busybox_unstripped | 359 | sizes: busybox_unstripped |
355 | $(NM) --size-sort $(<) | 360 | $(NM) --size-sort $(<) |
diff --git a/scripts/checkhelp.awk b/scripts/checkhelp.awk new file mode 100755 index 000000000..1a7e0ea8e --- /dev/null +++ b/scripts/checkhelp.awk | |||
@@ -0,0 +1,37 @@ | |||
1 | #!/usr/bin/awk -f | ||
2 | # AWK script to check for missing help entries for config options | ||
3 | # | ||
4 | # Copyright (C) 2006 Bernhard Fischer | ||
5 | # | ||
6 | # This file is distributed under the terms and conditions of the | ||
7 | # MIT/X public licenses. See http://opensource.org/licenses/mit-license.html | ||
8 | # and notice http://www.gnu.org/licenses/license-list.html#X11License | ||
9 | |||
10 | |||
11 | /^choice/ { is_choice = 1; } | ||
12 | /^endchoice/ { is_choice = 0; } | ||
13 | /^config/ { | ||
14 | pos++; | ||
15 | conf[pos] = $2; | ||
16 | file[pos] = FILENAME; | ||
17 | if (is_choice) { | ||
18 | help[pos] = 1; # do not warn about 'choice' config entries. | ||
19 | } else { | ||
20 | help[pos] = 0; | ||
21 | } | ||
22 | } | ||
23 | /^[[:space:]]*help[[:space:]]*$/ { | ||
24 | help[pos] = 1; | ||
25 | } | ||
26 | BEGIN { | ||
27 | pos = -1; | ||
28 | is_choice = 0; | ||
29 | } | ||
30 | END { | ||
31 | for (i = 0; i < pos; i++) { | ||
32 | # printf("%s: help for #%i '%s' == %i\n", file[i], i, conf[i], help[i]); | ||
33 | if (help[i] == 0) { | ||
34 | printf("%s: No helptext for '%s'\n", file[i], conf[i]); | ||
35 | } | ||
36 | } | ||
37 | } | ||