diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-04 16:36:52 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-04 16:36:52 -0800 |
commit | 25c862cc9ea9b312c25a9f577f91b973131f1261 (patch) | |
tree | 8e8f56531144370ced50fa98db2973f4e93e38b0 /scripts/Makefile.lib | |
parent | 52347f4e810ba323d02cd2c26b5d738f4a2c3d5e (diff) | |
parent | 8ded4ac018ea706bf7ee926601a27184665c9c28 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild
Diffstat (limited to 'scripts/Makefile.lib')
-rw-r--r-- | scripts/Makefile.lib | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib index 0f81dcfd690..550798f57da 100644 --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib @@ -81,8 +81,10 @@ obj-dirs := $(addprefix $(obj)/,$(obj-dirs)) # Note: It's possible that one object gets potentially linked into more # than one module. In that case KBUILD_MODNAME will be set to foo_bar, # where foo and bar are the name of the modules. -basename_flags = -DKBUILD_BASENAME=$(subst $(comma),_,$(subst -,_,$(*F))) -modname_flags = $(if $(filter 1,$(words $(modname))),-DKBUILD_MODNAME=$(subst $(comma),_,$(subst -,_,$(modname)))) +name-fix = $(subst $(comma),_,$(subst -,_,$1)) +basename_flags = -D"KBUILD_BASENAME=KBUILD_STR($(call name-fix,$(*F)))" +modname_flags = $(if $(filter 1,$(words $(modname))),\ + -D"KBUILD_MODNAME=KBUILD_STR($(call name-fix,$(modname)))") _c_flags = $(CFLAGS) $(EXTRA_CFLAGS) $(CFLAGS_$(*F).o) _a_flags = $(AFLAGS) $(EXTRA_AFLAGS) $(AFLAGS_$(*F).o) @@ -113,7 +115,7 @@ endif c_flags = -Wp,-MD,$(depfile) $(NOSTDINC_FLAGS) $(CPPFLAGS) \ $(__c_flags) $(modkern_cflags) \ - $(basename_flags) $(modname_flags) + -D"KBUILD_STR(s)=\#s" $(basename_flags) $(modname_flags) a_flags = -Wp,-MD,$(depfile) $(NOSTDINC_FLAGS) $(CPPFLAGS) \ $(__a_flags) $(modkern_aflags) |