scripts: config_whitelist: Handle lines with leading spaces/tabs
PATCH 1/1 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 <[email protected]>
---
scripts/build-whitelist.sh | 4 +- scripts/check-config.sh | 5 +- scripts/config_whitelist.txt | 115 ------------------------------------------- 3 files changed, 5 insertions(+), 119 deletions(-)
scripts/build-whitelist.sh +2 -2
@@ -39,8 +39,8 @@ git grep CONFIG_ | \ # Finally, we need a list of the valid Kconfig options to exclude these from # the whitelist. cat `find . -name "Kconfig*"` |sed -n \ - -e 's/^config *\([A-Za-z0-9_]*\).*$/CONFIG_\1/p' \ - -e 's/^menuconfig *\([A-Za-z0-9_]*\).*$/CONFIG_\1/p' \ + -e 's/^\s*config *\([A-Za-z0-9_]*\).*$/CONFIG_\1/p' \ + -e 's/^\s*menuconfig *\([A-Za-z0-9_]*\).*$/CONFIG_\1/p' \ |sort |uniq >scripts/config_whitelist.txt.tmp2 # Use only the options that are present in the first file but not the second.
scripts/check-config.sh +3 -2
@@ -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"
scripts/config_whitelist.txt +0 -115
518 lines not on this page · raw message
Signature · 1 line
2.9.2
Quoted 5 lines · Bin Meng
Some
Kconfigoptions 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 <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170629/b344645e/attachment.sig>