diff options
Diffstat (limited to 'scripts/Makefile.modpost')
-rw-r--r-- | scripts/Makefile.modpost | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/scripts/Makefile.modpost b/scripts/Makefile.modpost index 0a64688c2b5d..4b2721ca97da 100644 --- a/scripts/Makefile.modpost +++ b/scripts/Makefile.modpost | |||
@@ -51,19 +51,26 @@ _modpost: $(modules) | |||
51 | 51 | ||
52 | # Step 2), invoke modpost | 52 | # Step 2), invoke modpost |
53 | # Includes step 3,4 | 53 | # Includes step 3,4 |
54 | quiet_cmd_modpost = MODPOST | 54 | quiet_cmd_modpost = MODPOST $(words $(filter-out vmlinux FORCE, $^)) modules |
55 | cmd_modpost = scripts/mod/modpost \ | 55 | cmd_modpost = scripts/mod/modpost \ |
56 | $(if $(CONFIG_MODVERSIONS),-m) \ | 56 | $(if $(CONFIG_MODVERSIONS),-m) \ |
57 | $(if $(CONFIG_MODULE_SRCVERSION_ALL),-a,) \ | 57 | $(if $(CONFIG_MODULE_SRCVERSION_ALL),-a,) \ |
58 | $(if $(KBUILD_EXTMOD),-i,-o) $(kernelsymfile) \ | 58 | $(if $(KBUILD_EXTMOD),-i,-o) $(kernelsymfile) \ |
59 | $(if $(KBUILD_EXTMOD),-I $(modulesymfile)) \ | 59 | $(if $(KBUILD_EXTMOD),-I $(modulesymfile)) \ |
60 | $(if $(KBUILD_EXTMOD),-o $(modulesymfile)) \ | 60 | $(if $(KBUILD_EXTMOD),-o $(modulesymfile)) \ |
61 | $(filter-out FORCE,$^) | 61 | $(if $(KBUILD_EXTMOD),-w) \ |
62 | $(wildcard vmlinux) $(filter-out FORCE,$^) | ||
62 | 63 | ||
63 | PHONY += __modpost | 64 | PHONY += __modpost |
64 | __modpost: $(wildcard vmlinux) $(modules:.ko=.o) FORCE | 65 | __modpost: $(modules:.ko=.o) FORCE |
65 | $(call cmd,modpost) | 66 | $(call cmd,modpost) |
66 | 67 | ||
68 | quiet_cmd_kernel-mod = MODPOST $@ | ||
69 | cmd_kernel-mod = $(cmd_modpost) | ||
70 | |||
71 | vmlinux: FORCE | ||
72 | $(call cmd,kernel-mod) | ||
73 | |||
67 | # Declare generated files as targets for modpost | 74 | # Declare generated files as targets for modpost |
68 | $(symverfile): __modpost ; | 75 | $(symverfile): __modpost ; |
69 | $(modules:.ko=.mod.c): __modpost ; | 76 | $(modules:.ko=.mod.c): __modpost ; |