diff mbox

[RFC,1/3] kbuild: Move final argument to modpost into $(cmd_modpost)

Message ID 20180712221749.GL14131@decadent.org.uk (mailing list archive)
State New, archived
Headers show

Commit Message

Ben Hutchings July 12, 2018, 10:17 p.m. UTC
The following changes to the definition of $(cmd) will require that it
is given a complete command line, and no additional arguments can be
appended..

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
 scripts/Makefile.modpost | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Masahiro Yamada July 18, 2018, 5:28 a.m. UTC | #1
2018-07-13 7:17 GMT+09:00 Ben Hutchings <ben@decadent.org.uk>:
> The following changes to the definition of $(cmd) will require that it
> is given a complete command line, and no additional arguments can be
> appended..

Nit:  is only one period enough?


Otherwise, looks good to me.



> Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
> ---
>  scripts/Makefile.modpost | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/scripts/Makefile.modpost b/scripts/Makefile.modpost
> index df4174405feb..4e56df933b79 100644
> --- a/scripts/Makefile.modpost
> +++ b/scripts/Makefile.modpost
> @@ -85,11 +85,11 @@ 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
> -      cmd_modpost = $(MODLISTCMD) | sed 's/\.ko$$/.o/' | $(modpost) $(MODPOST_OPT) -s -T -
> +      cmd_modpost = $(MODLISTCMD) | sed 's/\.ko$$/.o/' | $(modpost) $(MODPOST_OPT) -s -T - $(wildcard vmlinux)
>
>  PHONY += __modpost
>  __modpost: $(modules:.ko=.o) FORCE
> -       $(call cmd,modpost) $(wildcard vmlinux)
> +       $(call cmd,modpost)
>
>  quiet_cmd_kernel-mod = MODPOST $@
>        cmd_kernel-mod = $(modpost) $@
>
diff mbox

Patch

diff --git a/scripts/Makefile.modpost b/scripts/Makefile.modpost
index df4174405feb..4e56df933b79 100644
--- a/scripts/Makefile.modpost
+++ b/scripts/Makefile.modpost
@@ -85,11 +85,11 @@  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
-      cmd_modpost = $(MODLISTCMD) | sed 's/\.ko$$/.o/' | $(modpost) $(MODPOST_OPT) -s -T -
+      cmd_modpost = $(MODLISTCMD) | sed 's/\.ko$$/.o/' | $(modpost) $(MODPOST_OPT) -s -T - $(wildcard vmlinux)
 
 PHONY += __modpost
 __modpost: $(modules:.ko=.o) FORCE
-	$(call cmd,modpost) $(wildcard vmlinux)
+	$(call cmd,modpost)
 
 quiet_cmd_kernel-mod = MODPOST $@
       cmd_kernel-mod = $(modpost) $@