summaryrefslogtreecommitdiff
path: root/scripts/Kbuild.include
diff options
context:
space:
mode:
authorMasahiro Yamada <masahiroy@kernel.org>2019-12-19 11:33:27 +0300
committerMasahiro Yamada <masahiroy@kernel.org>2020-01-06 20:18:38 +0300
commit7e826c44f5de3be00369d534dc38db485f6f26d5 (patch)
treef288b156cb35630aa63a91f9e0551098f10a2446 /scripts/Kbuild.include
parenta7499267976ce014fbc6f7defe9080367f94d6cc (diff)
downloadlinux-7e826c44f5de3be00369d534dc38db485f6f26d5.tar.xz
kbuild: add stringify helper to quote a string passed to C files
Make $(squote)$(quote)...$(quote)$(squote) a helper macro. I will reuse it in the next commit. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Diffstat (limited to 'scripts/Kbuild.include')
-rw-r--r--scripts/Kbuild.include4
1 files changed, 4 insertions, 0 deletions
diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include
index bc5f25763c1b..88c144787e57 100644
--- a/scripts/Kbuild.include
+++ b/scripts/Kbuild.include
@@ -33,6 +33,10 @@ real-prereqs = $(filter-out $(PHONY), $^)
escsq = $(subst $(squote),'\$(squote)',$1)
###
+# Quote a string to pass it to C files. foo => '"foo"'
+stringify = $(squote)$(quote)$1$(quote)$(squote)
+
+###
# Easy method for doing a status message
kecho := :
quiet_kecho := echo