kbuild: modpost: remove unnecessary dependency for __modpost
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Tue, 30 Jul 2019 15:59:01 +0000 (00:59 +0900)
committerMasahiro Yamada <yamada.masahiro@socionext.com>
Wed, 31 Jul 2019 15:09:49 +0000 (00:09 +0900)
__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 <yamada.masahiro@socionext.com>
scripts/Makefile.modpost

index c856512349cd207aab7a8fb60ced8f91f53f3a83..fdab32d6f552e4a7d5f95e078936b4e4c07a2028 100644 (file)
@@ -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 $@