Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

+5 -1
+4
scripts/Kbuild.include
··· 33 33 escsq = $(subst $(squote),'\$(squote)',$1) 34 34 35 35 ### 36 + # Quote a string to pass it to C files. foo => '"foo"' 37 + stringify = $(squote)$(quote)$1$(quote)$(squote) 38 + 39 + ### 36 40 # Easy method for doing a status message 37 41 kecho := : 38 42 quiet_kecho := echo
+1 -1
scripts/Makefile.lib
··· 97 97 # These flags are needed for modversions and compiling, so we define them here 98 98 # $(modname_flags) defines KBUILD_MODNAME as the name of the module it will 99 99 # end up in (or would, if it gets compiled in) 100 - name-fix = $(squote)$(quote)$(subst $(comma),_,$(subst -,_,$1))$(quote)$(squote) 100 + name-fix = $(call stringify,$(subst $(comma),_,$(subst -,_,$1))) 101 101 basename_flags = -DKBUILD_BASENAME=$(call name-fix,$(basetarget)) 102 102 modname_flags = -DKBUILD_MODNAME=$(call name-fix,$(modname)) 103 103