summaryrefslogtreecommitdiff
path: root/scripts/Makefile.lib
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/Makefile.lib
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/Makefile.lib')
-rw-r--r--scripts/Makefile.lib2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
index 724aa3e9b4a8..e5e5339bb575 100644
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
@@ -97,7 +97,7 @@ target-stem = $(basename $(patsubst $(obj)/%,%,$@))
# These flags are needed for modversions and compiling, so we define them here
# $(modname_flags) defines KBUILD_MODNAME as the name of the module it will
# end up in (or would, if it gets compiled in)
-name-fix = $(squote)$(quote)$(subst $(comma),_,$(subst -,_,$1))$(quote)$(squote)
+name-fix = $(call stringify,$(subst $(comma),_,$(subst -,_,$1)))
basename_flags = -DKBUILD_BASENAME=$(call name-fix,$(basetarget))
modname_flags = -DKBUILD_MODNAME=$(call name-fix,$(modname))