- add script to check for missing help entries of config options Currently we have these errors:
This commit was genuinely broken at the time (not related to our build system): scripts/config/mkconfigs.c (2005-08-01 - 2006-10-05 arasi) uretilen bbconfigopts.h icine .config satirlarini kacissiz, ham newline'larla gömüyordu - gecerli C degildi, busybox'un kendi bb_mkdep araci bile parse edemiyordu (7d219aab7 ile duzeltildi, mkconfigs shell scripte cevrildi)
No binary (build failed)
—
(log yok)
| @@ -133,6 +133,7 @@ help: | |
| @echo | |
| @echo 'Development:' | |
| @echo ' check - run the test suite for all applets' | |
| + | @echo ' checkhelp - check for missing help-entries in Config.in' |
| @echo ' randconfig - generate a random configuration' | |
| @echo ' release - create a distribution tarball' | |
| @echo ' sizes - show size of all enabled busybox symbols' | |
| @@ -350,6 +351,10 @@ check test: busybox | |
| bindir=$(top_builddir) srcdir=$(top_srcdir)/testsuite \ | |
| $(top_srcdir)/testsuite/runtest $(CHECK_VERBOSE) | |
| + | .PHONY: checkhelp |
| + | checkhelp: |
| + | $(Q)$(top_srcdir)/scripts/checkhelp.awk \ |
| + | $(wildcard $(patsubst %,%/Config.in,$(SRC_DIRS) ./)) |
| .PHONY: sizes | |
| sizes: busybox_unstripped | |
| $(NM) --size-sort $(<) | |
| @@ -0,0 +1,37 @@ | |
| + | #!/usr/bin/awk -f |
| + | # AWK script to check for missing help entries for config options |
| + | # |
| + | # Copyright (C) 2006 Bernhard Fischer |
| + | # |
| + | # This file is distributed under the terms and conditions of the |
| + | # MIT/X public licenses. See http://opensource.org/licenses/mit-license.html |
| + | # and notice http://www.gnu.org/licenses/license-list.html#X11License |
| + | |
| + | |
| + | /^choice/ { is_choice = 1; } |
| + | /^endchoice/ { is_choice = 0; } |
| + | /^config/ { |
| + | pos++; |
| + | conf[pos] = $2; |
| + | file[pos] = FILENAME; |
| + | if (is_choice) { |
| + | help[pos] = 1; # do not warn about 'choice' config entries. |
| + | } else { |
| + | help[pos] = 0; |
| + | } |
| + | } |
| + | /^[[:space:]]*help[[:space:]]*$/ { |
| + | help[pos] = 1; |
| + | } |
| + | BEGIN { |
| + | pos = -1; |
| + | is_choice = 0; |
| + | } |
| + | END { |
| + | for (i = 0; i < pos; i++) { |
| + | # printf("%s: help for #%i '%s' == %i\n", file[i], i, conf[i], help[i]); |
| + | if (help[i] == 0) { |
| + | printf("%s: No helptext for '%s'\n", file[i], conf[i]); |
| + | } |
| + | } |
| + | } |