All of lore.kernel.org
 help / color / mirror / Atom feed
From: Masahiro Yamada <yamada.masahiro@socionext.com>
To: Linux Kbuild mailing list <linux-kbuild@vger.kernel.org>
Cc: Michal Marek <michal.lkml@markovi.net>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/2] kbuild: fix missed rebuild of modules.builtin
Date: Sat, 6 Jul 2019 23:45:15 +0900	[thread overview]
Message-ID: <CAK7LNARCHQ3Tv91txwnLAVwFuZaOJeA+tJe2TpJ0NA8Q6ThnDw@mail.gmail.com> (raw)
In-Reply-To: <20190623161328.22461-1-yamada.masahiro@socionext.com>

On Mon, Jun 24, 2019 at 1:13 AM Masahiro Yamada
<yamada.masahiro@socionext.com> wrote:
>
> Unlike modules.order, modules.builtin is not rebuilt every time.
> Once modules.builtin is created, it will not be updated until
> auto.conf or tristate.conf is changed.
>
> So, it misses to notice a change in Makefile, for example, renaming
> of modules.
>
> Kbuild must always descend into directories for modules.builtin too.
>
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> ---

Both applied to linux-kbuild.

>
>  Makefile | 12 ++++++++----
>  1 file changed, 8 insertions(+), 4 deletions(-)
>
> diff --git a/Makefile b/Makefile
> index 9514dac2660a..19c33bc69bb1 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -1289,12 +1289,16 @@ modules: $(vmlinux-dirs) $(if $(KBUILD_BUILTIN),vmlinux) modules.builtin
>         $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost
>         $(Q)$(CONFIG_SHELL) $(srctree)/scripts/modules-check.sh
>
> -modules.builtin: $(vmlinux-dirs:%=%/modules.builtin)
> -       $(Q)$(AWK) '!x[$$0]++' $^ > $(objtree)/modules.builtin
> +modbuiltin-dirs := $(addprefix _modbuiltin_, $(vmlinux-dirs))
>
> -%/modules.builtin: include/config/auto.conf include/config/tristate.conf
> -       $(Q)$(MAKE) $(modbuiltin)=$*
> +modules.builtin: $(modbuiltin-dirs)
> +       $(Q)$(AWK) '!x[$$0]++' $(addsuffix /$@, $(vmlinux-dirs)) > $@
>
> +PHONY += $(modbuiltin-dirs)
> +# tristate.conf is not included from this Makefile. Add it as a prerequisite
> +# here to make it self-healing in case somebody accidentally removes it.
> +$(modbuiltin-dirs): include/config/tristate.conf
> +       $(Q)$(MAKE) $(modbuiltin)=$(patsubst _modbuiltin_%,%,$@)
>
>  # Target to prepare building external modules
>  PHONY += modules_prepare
> --
> 2.17.1
>


-- 
Best Regards
Masahiro Yamada

      parent reply	other threads:[~2019-07-06 14:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-23 16:13 [PATCH 1/2] kbuild: fix missed rebuild of modules.builtin Masahiro Yamada
2019-06-23 16:13 ` [PATCH 2/2] kbuild: split modules.order build rule out of 'modules' target Masahiro Yamada
2019-07-06 14:45 ` Masahiro Yamada [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAK7LNARCHQ3Tv91txwnLAVwFuZaOJeA+tJe2TpJ0NA8Q6ThnDw@mail.gmail.com \
    --to=yamada.masahiro@socionext.com \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michal.lkml@markovi.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.