diff options
author | Bin Meng <bmeng.cn@gmail.com> | 2017-06-29 11:36:25 +0800 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2017-06-29 10:01:10 -0400 |
commit | 1f54a47ca1720a9b50a4ea59f263fc95eb1f89ea (patch) | |
tree | 4251d682ce89f4e2ceedaea5750af15798081294 /scripts/check-config.sh | |
parent | f8136e68cc2bb31cdfdcd54329efa5637171f98f (diff) |
scripts: config_whitelist: Handle lines with leading spaces/tabs
Some Kconfig options are defined in a line with leading spaces/tabs.
Update build-whitelist/check-config scripts to handle such cases.
Generate a new config_whitelist.txt with new scripts.
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Diffstat (limited to 'scripts/check-config.sh')
-rwxr-xr-x | scripts/check-config.sh | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/scripts/check-config.sh b/scripts/check-config.sh index 97e52dce83d..267758498b3 100755 --- a/scripts/check-config.sh +++ b/scripts/check-config.sh @@ -33,8 +33,9 @@ cat ${path} |sed -n 's/^#define \(CONFIG_[A-Za-z0-9_]*\).*/\1/p' |sort |uniq \ comm -23 ${configs} ${whitelist} > ${suspects} cat `find ${srctree} -name "Kconfig*"` |sed -n \ - -e 's/^config *\([A-Za-z0-9_]*\).*$/CONFIG_\1/p' \ - -e 's/^menuconfig \([A-Za-z0-9_]*\).*$/CONFIG_\1/p' |sort |uniq > ${ok} + -e 's/^\s*config *\([A-Za-z0-9_]*\).*$/CONFIG_\1/p' \ + -e 's/^\s*menuconfig \([A-Za-z0-9_]*\).*$/CONFIG_\1/p' \ + |sort |uniq > ${ok} comm -23 ${suspects} ${ok} >${new_adhoc} if [ -s ${new_adhoc} ]; then echo >&2 "Error: You must add new CONFIG options using Kconfig" |