diff mbox series

kbuild: descend to scripts/kconfig/ directly when syncconfig is needed

Message ID 1547799412-20120-1-git-send-email-yamada.masahiro@socionext.com (mailing list archive)
State New, archived
Headers show
Series kbuild: descend to scripts/kconfig/ directly when syncconfig is needed | expand

Commit Message

Masahiro Yamada Jan. 18, 2019, 8:16 a.m. UTC
The recursion of the top Makefile is inefficient.
Just descend to scripts/kconfig/.

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

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

Comments

Masahiro Yamada Jan. 24, 2019, 4:25 a.m. UTC | #1
On Fri, Jan 18, 2019 at 5:17 PM Masahiro Yamada
<yamada.masahiro@socionext.com> wrote:
>
> The recursion of the top Makefile is inefficient.
> Just descend to scripts/kconfig/.
>
> 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 9851a44..d5f0ac4 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -631,7 +631,7 @@ $(KCONFIG_CONFIG) include/config/auto.conf.cmd: ;
>  # include/generated/ and include/config/. Update them if .config is newer than
>  # include/config/auto.conf (which mirrors .config).
>  include/config/%.conf: $(KCONFIG_CONFIG) include/config/auto.conf.cmd
> -       $(Q)$(MAKE) -f $(srctree)/Makefile syncconfig
> +       $(Q)$(MAKE) $(build)=scripts/kconfig syncconfig
>  else
>  # External modules and some install targets need include/generated/autoconf.h
>  # and include/config/auto.conf but do not care if they are up-to-date.
> --
> 2.7.4
>
Masahiro Yamada Feb. 19, 2019, 2:52 p.m. UTC | #2
On Thu, Jan 24, 2019 at 1:25 PM Masahiro Yamada
<yamada.masahiro@socionext.com> wrote:
>
> On Fri, Jan 18, 2019 at 5:17 PM Masahiro Yamada
> <yamada.masahiro@socionext.com> wrote:
> >
> > The recursion of the top Makefile is inefficient.
> > Just descend to scripts/kconfig/.
> >
> > Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> > ---
>
> Applied to linux-kbuild.


I dropped this patch from my tree
because it has a drawback.


When I run 'make' in a pristine source tree,
I see a strange 'scripts/basic/fixdep: not found' error message.


$ make mrproper; make
  HOSTCC  scripts/kconfig/conf.o
/bin/sh: 1: scripts/basic/fixdep: not found
make[1]: *** [scripts/Makefile.host;109: scripts/kconfig/conf.o] Error 127
make[1]: *** Deleting file 'scripts/kconfig/conf.o'
Makefile:594: include/config/auto.conf: No such file or directory
make: *** [Makefile;634: include/config/auto.conf] Error 2
diff mbox series

Patch

diff --git a/Makefile b/Makefile
index 9851a44..d5f0ac4 100644
--- a/Makefile
+++ b/Makefile
@@ -631,7 +631,7 @@  $(KCONFIG_CONFIG) include/config/auto.conf.cmd: ;
 # include/generated/ and include/config/. Update them if .config is newer than
 # include/config/auto.conf (which mirrors .config).
 include/config/%.conf: $(KCONFIG_CONFIG) include/config/auto.conf.cmd
-	$(Q)$(MAKE) -f $(srctree)/Makefile syncconfig
+	$(Q)$(MAKE) $(build)=scripts/kconfig syncconfig
 else
 # External modules and some install targets need include/generated/autoconf.h
 # and include/config/auto.conf but do not care if they are up-to-date.