LKML Archive on lore.kernel.org
 help / Atom feed
* [PATCH 1/2] kbuild: hide most of targets when running config or mixed targets
@ 2018-09-12  6:43 Masahiro Yamada
  2018-09-12  6:43 ` [PATCH 2/2] kbuild: remove dead code in cmd_files calculation in top Makefile Masahiro Yamada
  2018-09-14 13:05 ` [PATCH 1/2] kbuild: hide most of targets when running config or mixed targets Masahiro Yamada
  0 siblings, 2 replies; 4+ messages in thread
From: Masahiro Yamada @ 2018-09-12  6:43 UTC (permalink / raw)
  To: linux-kbuild; +Cc: Masahiro Yamada, Michal Marek, linux-kernel

When mixed/config targets are being processed, the top Makefile
does not need to parse the rest of targets.

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

 Makefile | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/Makefile b/Makefile
index 4d5c883..4b76e22 100644
--- a/Makefile
+++ b/Makefile
@@ -1615,9 +1615,6 @@ namespacecheck:
 export_report:
 	$(PERL) $(srctree)/scripts/export_report.pl
 
-endif #ifeq ($(config-targets),1)
-endif #ifeq ($(mixed-targets),1)
-
 PHONY += checkstack kernelrelease kernelversion image_name
 
 # UML needs a little special treatment here.  It wants to use the host
@@ -1732,6 +1729,8 @@ ifneq ($(cmd_files),)
   include $(cmd_files)
 endif
 
+endif   # ifeq ($(config-targets),1)
+endif   # ifeq ($(mixed-targets),1)
 endif	# skip-makefile
 
 PHONY += FORCE
-- 
2.7.4


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

* [PATCH 2/2] kbuild: remove dead code in cmd_files calculation in top Makefile
  2018-09-12  6:43 [PATCH 1/2] kbuild: hide most of targets when running config or mixed targets Masahiro Yamada
@ 2018-09-12  6:43 ` Masahiro Yamada
  2018-09-14 13:06   ` Masahiro Yamada
  2018-09-14 13:05 ` [PATCH 1/2] kbuild: hide most of targets when running config or mixed targets Masahiro Yamada
  1 sibling, 1 reply; 4+ messages in thread
From: Masahiro Yamada @ 2018-09-12  6:43 UTC (permalink / raw)
  To: linux-kbuild; +Cc: Masahiro Yamada, Michal Marek, linux-kernel

Nobody sets 'targets' in the top-level Makefile or arch/*/Makefile,
hence $(targets) is empty.

$(wildcard .*.cmd) will do for including the .vmlinux.cmd file.

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

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

diff --git a/Makefile b/Makefile
index 4b76e22..8f6dbfc 100644
--- a/Makefile
+++ b/Makefile
@@ -1721,8 +1721,7 @@ cmd_crmodverdir = $(Q)mkdir -p $(MODVERDIR) \
                   $(if $(KBUILD_MODULES),; rm -f $(MODVERDIR)/*)
 
 # read all saved command lines
-
-cmd_files := $(wildcard .*.cmd $(foreach f,$(sort $(targets)),$(dir $(f)).$(notdir $(f)).cmd))
+cmd_files := $(wildcard .*.cmd)
 
 ifneq ($(cmd_files),)
   $(cmd_files): ;	# Do not try to update included dependency files
-- 
2.7.4


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

* Re: [PATCH 1/2] kbuild: hide most of targets when running config or mixed targets
  2018-09-12  6:43 [PATCH 1/2] kbuild: hide most of targets when running config or mixed targets Masahiro Yamada
  2018-09-12  6:43 ` [PATCH 2/2] kbuild: remove dead code in cmd_files calculation in top Makefile Masahiro Yamada
@ 2018-09-14 13:05 ` Masahiro Yamada
  1 sibling, 0 replies; 4+ messages in thread
From: Masahiro Yamada @ 2018-09-14 13:05 UTC (permalink / raw)
  To: Linux Kbuild mailing list
  Cc: Masahiro Yamada, Michal Marek, Linux Kernel Mailing List

2018-09-12 15:43 GMT+09:00 Masahiro Yamada <yamada.masahiro@socionext.com>:
> When mixed/config targets are being processed, the top Makefile
> does not need to parse the rest of targets.
>
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> ---

Applied to linux-kbuild.


>  Makefile | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/Makefile b/Makefile
> index 4d5c883..4b76e22 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -1615,9 +1615,6 @@ namespacecheck:
>  export_report:
>         $(PERL) $(srctree)/scripts/export_report.pl
>
> -endif #ifeq ($(config-targets),1)
> -endif #ifeq ($(mixed-targets),1)
> -
>  PHONY += checkstack kernelrelease kernelversion image_name
>
>  # UML needs a little special treatment here.  It wants to use the host
> @@ -1732,6 +1729,8 @@ ifneq ($(cmd_files),)
>    include $(cmd_files)
>  endif
>
> +endif   # ifeq ($(config-targets),1)
> +endif   # ifeq ($(mixed-targets),1)
>  endif  # skip-makefile
>
>  PHONY += FORCE
> --
> 2.7.4
>



-- 
Best Regards
Masahiro Yamada

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

* Re: [PATCH 2/2] kbuild: remove dead code in cmd_files calculation in top Makefile
  2018-09-12  6:43 ` [PATCH 2/2] kbuild: remove dead code in cmd_files calculation in top Makefile Masahiro Yamada
@ 2018-09-14 13:06   ` Masahiro Yamada
  0 siblings, 0 replies; 4+ messages in thread
From: Masahiro Yamada @ 2018-09-14 13:06 UTC (permalink / raw)
  To: Linux Kbuild mailing list
  Cc: Masahiro Yamada, Michal Marek, Linux Kernel Mailing List

2018-09-12 15:43 GMT+09:00 Masahiro Yamada <yamada.masahiro@socionext.com>:
> Nobody sets 'targets' in the top-level Makefile or arch/*/Makefile,
> hence $(targets) is empty.
>
> $(wildcard .*.cmd) will do for including the .vmlinux.cmd file.
>
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> ---

Applied to linux-kbuild.


>  Makefile | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/Makefile b/Makefile
> index 4b76e22..8f6dbfc 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -1721,8 +1721,7 @@ cmd_crmodverdir = $(Q)mkdir -p $(MODVERDIR) \
>                    $(if $(KBUILD_MODULES),; rm -f $(MODVERDIR)/*)
>
>  # read all saved command lines
> -
> -cmd_files := $(wildcard .*.cmd $(foreach f,$(sort $(targets)),$(dir $(f)).$(notdir $(f)).cmd))
> +cmd_files := $(wildcard .*.cmd)
>
>  ifneq ($(cmd_files),)
>    $(cmd_files): ;      # Do not try to update included dependency files
> --
> 2.7.4
>



-- 
Best Regards
Masahiro Yamada

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

end of thread, back to index

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-12  6:43 [PATCH 1/2] kbuild: hide most of targets when running config or mixed targets Masahiro Yamada
2018-09-12  6:43 ` [PATCH 2/2] kbuild: remove dead code in cmd_files calculation in top Makefile Masahiro Yamada
2018-09-14 13:06   ` Masahiro Yamada
2018-09-14 13:05 ` [PATCH 1/2] kbuild: hide most of targets when running config or mixed targets Masahiro Yamada

LKML Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/lkml/0 lkml/git/0.git
	git clone --mirror https://lore.kernel.org/lkml/1 lkml/git/1.git
	git clone --mirror https://lore.kernel.org/lkml/2 lkml/git/2.git
	git clone --mirror https://lore.kernel.org/lkml/3 lkml/git/3.git
	git clone --mirror https://lore.kernel.org/lkml/4 lkml/git/4.git
	git clone --mirror https://lore.kernel.org/lkml/5 lkml/git/5.git
	git clone --mirror https://lore.kernel.org/lkml/6 lkml/git/6.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 lkml lkml/ https://lore.kernel.org/lkml \
		linux-kernel@vger.kernel.org linux-kernel@archiver.kernel.org
	public-inbox-index lkml


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-kernel


AGPL code for this site: git clone https://public-inbox.org/ public-inbox