diff options
author | Masahiro Yamada <masahiroy@kernel.org> | 2019-12-19 17:33:27 +0900 |
---|---|---|
committer | Masahiro Yamada <masahiroy@kernel.org> | 2020-01-07 02:18:38 +0900 |
commit | 7e826c44f5de3be00369d534dc38db485f6f26d5 (patch) | |
tree | f288b156cb35630aa63a91f9e0551098f10a2446 /scripts/Kbuild.include | |
parent | a7499267976ce014fbc6f7defe9080367f94d6cc (diff) | |
download | lwn-7e826c44f5de3be00369d534dc38db485f6f26d5.tar.gz lwn-7e826c44f5de3be00369d534dc38db485f6f26d5.zip |
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.include | 4 |
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 |