diff options
author | Masahiro Yamada <yamada.masahiro@socionext.com> | 2018-12-11 15:01:55 +0300 |
---|---|---|
committer | Masahiro Yamada <yamada.masahiro@socionext.com> | 2018-12-16 18:33:43 +0300 |
commit | 96c0a9180a1279c8ca5d9ea3096f2944828194d3 (patch) | |
tree | c8a9d9f9144ab26d4851b1baced29b118df0d55c /scripts | |
parent | 45c4372d002bbf7342ea0426af896691ebc3a2f7 (diff) | |
download | linux-96c0a9180a1279c8ca5d9ea3096f2944828194d3.tar.xz |
kbuild: refactor part-of-module
Use $(foreach ...) to make it shorter.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/Makefile.build | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/scripts/Makefile.build b/scripts/Makefile.build index f83942b40ad1..c09fe9099f58 100644 --- a/scripts/Makefile.build +++ b/scripts/Makefile.build @@ -94,17 +94,15 @@ endif # --------------------------------------------------------------------------- # Default is built-in, unless we know otherwise +$(foreach x, i lst o s, $(patsubst %.o,%.$(x),$(real-obj-m))): \ + part-of-module := y + modkern_cflags = \ $(if $(part-of-module), \ $(KBUILD_CFLAGS_MODULE) $(CFLAGS_MODULE), \ $(KBUILD_CFLAGS_KERNEL) $(CFLAGS_KERNEL)) quiet_modtag = $(if $(part-of-module),[M], ) -$(real-obj-m) : part-of-module := y -$(real-obj-m:.o=.i) : part-of-module := y -$(real-obj-m:.o=.s) : part-of-module := y -$(real-obj-m:.o=.lst): part-of-module := y - quiet_cmd_cc_s_c = CC $(quiet_modtag) $@ cmd_cc_s_c = $(CC) $(c_flags) $(DISABLE_LTO) -fverbose-asm -S -o $@ $< |