Skip to content

Commit

Permalink
kbuild: modpost: remove unnecessary dependency for __modpost
Browse files Browse the repository at this point in the history
__modpost is a phony target. The dependency on FORCE is pointless.
All the objects have been built in the previous stage, so the
dependency on the objects are not necessary either.

Count the number of modules in a more straightforward way.

Signed-off-by: Masahiro Yamada <[email protected]>
  • Loading branch information
masahir0y committed Jul 31, 2019
1 parent cb48199 commit acf2a13
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/Makefile.modpost
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,11 @@ modpost = scripts/mod/modpost \
MODPOST_OPT=$(subst -i,-n,$(filter -i,$(MAKEFLAGS)))

# We can go over command line length here, so be careful.
quiet_cmd_modpost = MODPOST $(words $(filter-out vmlinux FORCE, $^)) modules
quiet_cmd_modpost = MODPOST $(words $(modules)) modules
cmd_modpost = sed 's/ko$$/o/' $(modorder) | $(modpost) $(MODPOST_OPT) -s -T -

PHONY += __modpost
__modpost: $(modules:.ko=.o) FORCE
__modpost:
$(call cmd,modpost) $(wildcard vmlinux)

quiet_cmd_kernel-mod = MODPOST $@
Expand Down

0 comments on commit acf2a13

Please sign in to comment.