All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] kbuild: fix warning "overriding recipe for target 'Makefile'"
@ 2019-03-26  6:32 Masahiro Yamada
  2019-03-30  5:12 ` Masahiro Yamada
  0 siblings, 1 reply; 2+ messages in thread
From: Masahiro Yamada @ 2019-03-26  6:32 UTC (permalink / raw)
  To: linux-kbuild; +Cc: Masahiro Yamada, Michal Marek, linux-kernel

If you do "make Makefile" with GNU Make 3.x, the following warning
is displayed:

  $ make Makefile
  Makefile:165: warning: overriding recipe for target 'Makefile'
  Makefile:51: warning: ignoring old recipe for target 'Makefile'
  make[1]: Nothing to be done for 'Makefile'.
  make: Nothing to be done for 'Makefile'.

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

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

diff --git a/Makefile b/Makefile
index 70fc778..1b361bd 100644
--- a/Makefile
+++ b/Makefile
@@ -161,7 +161,7 @@ ifeq ($(need-sub-make),1)
 
 PHONY += $(MAKECMDGOALS) sub-make
 
-$(filter-out _all sub-make $(CURDIR)/Makefile, $(MAKECMDGOALS)) _all: sub-make
+$(filter-out _all sub-make $(lastword $(MAKEFILE_LIST)), $(MAKECMDGOALS)) _all: sub-make
 	@:
 
 # Invoke a second make in the output directory, passing relevant variables
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] kbuild: fix warning "overriding recipe for target 'Makefile'"
  2019-03-26  6:32 [PATCH] kbuild: fix warning "overriding recipe for target 'Makefile'" Masahiro Yamada
@ 2019-03-30  5:12 ` Masahiro Yamada
  0 siblings, 0 replies; 2+ messages in thread
From: Masahiro Yamada @ 2019-03-30  5:12 UTC (permalink / raw)
  To: Linux Kbuild mailing list; +Cc: Michal Marek, Linux Kernel Mailing List

On Tue, Mar 26, 2019 at 3:46 PM Masahiro Yamada
<yamada.masahiro@socionext.com> wrote:
>
> If you do "make Makefile" with GNU Make 3.x, the following warning
> is displayed:
>
>   $ make Makefile
>   Makefile:165: warning: overriding recipe for target 'Makefile'
>   Makefile:51: warning: ignoring old recipe for target 'Makefile'
>   make[1]: Nothing to be done for 'Makefile'.
>   make: Nothing to be done for 'Makefile'.
>
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> ---

Applied to linux-kbuild.



>
>  Makefile | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/Makefile b/Makefile
> index 70fc778..1b361bd 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -161,7 +161,7 @@ ifeq ($(need-sub-make),1)
>
>  PHONY += $(MAKECMDGOALS) sub-make
>
> -$(filter-out _all sub-make $(CURDIR)/Makefile, $(MAKECMDGOALS)) _all: sub-make
> +$(filter-out _all sub-make $(lastword $(MAKEFILE_LIST)), $(MAKECMDGOALS)) _all: sub-make
>         @:
>
>  # Invoke a second make in the output directory, passing relevant variables
> --
> 2.7.4
>


-- 
Best Regards
Masahiro Yamada

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-03-30  5:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-26  6:32 [PATCH] kbuild: fix warning "overriding recipe for target 'Makefile'" Masahiro Yamada
2019-03-30  5:12 ` Masahiro Yamada

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.