Skip to content

Commit bcfedae

Browse files
committed
modpost: print symbol dump file as the build target in short log
The symbol dump *.symvers is the output of modpost. Print it in the short log. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
1 parent e3fb4df commit bcfedae

1 file changed

Lines changed: 20 additions & 13 deletions

File tree

‎scripts/Makefile.modpost‎

Lines changed: 20 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -44,32 +44,35 @@ include include/config/auto.conf
4444
include scripts/Kbuild.include
4545

4646
kernelsymfile := $(objtree)/Module.symvers
47-
modulesymfile := $(KBUILD_EXTMOD)/Module.symvers
4847

4948
MODPOST = scripts/mod/modpost \
5049
$(if $(CONFIG_MODVERSIONS),-m) \
5150
$(if $(CONFIG_MODULE_SRCVERSION_ALL),-a) \
52-
$(if $(KBUILD_EXTMOD),-i,-o) $(kernelsymfile) \
51+
$(if $(KBUILD_EXTMOD),-i $(kernelsymfile)) \
5352
$(if $(KBUILD_EXTMOD),$(addprefix -i ,$(KBUILD_EXTRA_SYMBOLS))) \
54-
$(if $(KBUILD_EXTMOD),-o $(modulesymfile)) \
5553
$(if $(CONFIG_SECTION_MISMATCH_WARN_ONLY),,-E) \
56-
$(if $(KBUILD_MODPOST_WARN),-w)
54+
$(if $(KBUILD_MODPOST_WARN),-w) \
55+
-o $@
5756

5857
ifdef MODPOST_VMLINUX
5958

60-
quiet_cmd_modpost = MODPOST vmlinux.o
61-
cmd_modpost = $(MODPOST) vmlinux.o
59+
quiet_cmd_modpost = MODPOST $@
60+
cmd_modpost = $(MODPOST) $<
6261

63-
__modpost:
62+
Module.symvers: vmlinux.o
6463
$(call cmd,modpost)
6564

65+
__modpost: Module.symvers
66+
6667
else
6768

6869
MODPOST += -s \
6970
$(if $(KBUILD_NSDEPS),-d $(MODULES_NSDEPS))
7071

7172
ifeq ($(KBUILD_EXTMOD),)
7273
MODPOST += $(wildcard vmlinux)
74+
output-symdump := Module.symvers
75+
7376
else
7477

7578
# set src + obj - they may be used in the modules's Makefile
@@ -83,6 +86,8 @@ include $(if $(wildcard $(KBUILD_EXTMOD)/Kbuild), \
8386
# modpost option for external modules
8487
MODPOST += -e
8588

89+
output-symdump := $(KBUILD_EXTMOD)/Module.symvers
90+
8691
endif
8792

8893
# modpost options for modules (both in-kernel and external)
@@ -94,20 +99,22 @@ ifneq ($(findstring i,$(filter-out --%,$(MAKEFLAGS))),)
9499
MODPOST += -n
95100
endif
96101

97-
# find all modules listed in modules.order
98-
modules := $(sort $(shell cat $(MODORDER)))
99-
100-
# Read out modules.order instead of expanding $(modules) to pass in modpost.
102+
# Read out modules.order to pass in modpost.
101103
# Otherwise, allmodconfig would fail with "Argument list too long".
102-
quiet_cmd_modpost = MODPOST $(words $(modules)) modules
104+
quiet_cmd_modpost = MODPOST $@
103105
cmd_modpost = sed 's/ko$$/o/' $(MODORDER) | $(MODPOST) -T -
104106

105-
__modpost:
107+
$(output-symdump): FORCE
106108
$(call cmd,modpost)
109+
110+
__modpost: $(output-symdump)
107111
ifneq ($(KBUILD_MODPOST_NOFINAL),1)
108112
$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modfinal
109113
endif
110114

115+
PHONY += FORCE
116+
FORCE:
117+
111118
endif
112119

113120
.PHONY: $(PHONY)

0 commit comments

Comments
 (0)