diff mbox series

[1/6] kbuild: pass $(MAKECMDGOALS) to sub-make as is

Message ID 1553947458-8311-1-git-send-email-yamada.masahiro@socionext.com (mailing list archive)
State New, archived
Headers show
Series [1/6] kbuild: pass $(MAKECMDGOALS) to sub-make as is | expand

Commit Message

Masahiro Yamada March 30, 2019, 12:04 p.m. UTC
Manipulating $(MAKECMDGOALS) for sub-make seems odd to me.

[1] 'make O=foo sub-make' is turned into 'make O=foo', which builds
the default targets. It would make sense to terminate the build with:

  *** No rule to make target 'sub-make'.  Stop.

[2] 'make O=foo defconfig _all' is turned into 'make O=foo defconfig',
which changes the behavior.

Let's pass $(MAKECMDGOALS) as is.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---

 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Masahiro Yamada April 7, 2019, 9:21 a.m. UTC | #1
On Sat, Mar 30, 2019 at 9:04 PM Masahiro Yamada
<yamada.masahiro@socionext.com> wrote:
>
> Manipulating $(MAKECMDGOALS) for sub-make seems odd to me.
>
> [1] 'make O=foo sub-make' is turned into 'make O=foo', which builds
> the default targets. It would make sense to terminate the build with:
>
>   *** No rule to make target 'sub-make'.  Stop.
>
> [2] 'make O=foo defconfig _all' is turned into 'make O=foo defconfig',
> which changes the behavior.
>
> Let's pass $(MAKECMDGOALS) as is.
>
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> ---

Series, applied to linux-kbuild.


>  Makefile | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/Makefile b/Makefile
> index 92ad066..9cbd367 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -168,7 +168,7 @@ $(filter-out _all sub-make $(lastword $(MAKEFILE_LIST)), $(MAKECMDGOALS)) _all:
>  sub-make:
>         $(Q)$(MAKE) \
>         $(if $(KBUILD_OUTPUT),-C $(KBUILD_OUTPUT) KBUILD_SRC=$(CURDIR)) \
> -       -f $(CURDIR)/Makefile $(filter-out _all sub-make,$(MAKECMDGOALS))
> +       -f $(CURDIR)/Makefile $(MAKECMDGOALS)
>
>  endif # need-sub-make
>  endif # sub_make_done
> --
> 2.7.4
>
diff mbox series

Patch

diff --git a/Makefile b/Makefile
index 92ad066..9cbd367 100644
--- a/Makefile
+++ b/Makefile
@@ -168,7 +168,7 @@  $(filter-out _all sub-make $(lastword $(MAKEFILE_LIST)), $(MAKECMDGOALS)) _all:
 sub-make:
 	$(Q)$(MAKE) \
 	$(if $(KBUILD_OUTPUT),-C $(KBUILD_OUTPUT) KBUILD_SRC=$(CURDIR)) \
-	-f $(CURDIR)/Makefile $(filter-out _all sub-make,$(MAKECMDGOALS))
+	-f $(CURDIR)/Makefile $(MAKECMDGOALS)
 
 endif # need-sub-make
 endif # sub_make_done