summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorMichael Olbrich <m.olbrich@pengutronix.de>2022-06-24 20:37:24 +0200
committerMichael Olbrich <m.olbrich@pengutronix.de>2022-06-25 08:56:14 +0200
commit8fd442f7b55b7a394836ddc763a4c4c184effa02 (patch)
tree6469b74e48a804e7135db4c833e70f80429dd853 /scripts
parent8564bc3e7295d7e38c26f271df2e5c45655e0bb5 (diff)
downloadptxdist-8fd442f7b55b7a394836ddc763a4c4c184effa02.tar.gz
ptxdist-8fd442f7b55b7a394836ddc763a4c4c184effa02.tar.xz
ptxd_make_world_lint: improve kconfig symbol collection in rule files
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/lib/ptxd_make_world_lint.sh12
1 files changed, 9 insertions, 3 deletions
diff --git a/scripts/lib/ptxd_make_world_lint.sh b/scripts/lib/ptxd_make_world_lint.sh
index 36fa7877d..3ba68547e 100644
--- a/scripts/lib/ptxd_make_world_lint.sh
+++ b/scripts/lib/ptxd_make_world_lint.sh
@@ -39,10 +39,12 @@ ptxd_make_world_lint_symbols_make_get() {
# - split after ')' to match multiple symbols in one line
# - match '$(PTXCONF_*)'
# - match 'ifdef PTXCONF_*' and similar things
- # - skip (BOARD|)SETUP_ for now because we cannot track those symbols
+ # - match '$(call ... PTXCONF_*)'
sed -e '/^#/d' -e 's/)/)\n/g' "${1}" | \
- sed -n -e 's/.*\$(PTXCONF_\([A-Z0-9_]\+\)).*/\1/p' \
- -e 's/.* PTXCONF_\([A-Z0-9_]\+\)$/\1/p' | \
+ sed -e 's/.*\$[{(]\(PTXCONF_[A-Z0-9_]\+\)[})].*/\1/' \
+ -e 's/.* \(PTXCONF_[A-Z0-9_]\+\)$/\1/' \
+ -e 's/.*call .*[, ]\(PTXCONF_[A-Z0-9_]\+\).*/\1/' | \
+ sed -n 's/^PTXCONF_\([A-Z0-9_][A-Z0-9_]*\)$/\1/p' | \
sort -u
}
export -f ptxd_make_world_lint_symbols_make_get
@@ -57,6 +59,10 @@ ptxd_make_world_lint_symbols_make() {
# skip for now because we cannot track those symbols
continue
fi
+ if [ "${symbol}" = "QT5_MODULE_" ]; then
+ # used in a macro to build configure options
+ continue
+ fi
symbol="PTXCONF_${symbol}"
if [ -z "${!symbol}" ]; then
ptxd_lint_error "Undefined symbol ${symbol} used in '$(ptxd_print_path "${1}")'."