linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Masahiro Yamada <masahiroy@kernel.org>
To: Linux Kbuild mailing list <linux-kbuild@vger.kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Greg Thelen <gthelen@google.com>, Sam Ravnborg <sam@ravnborg.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Ben Hutchings <ben@decadent.org.uk>,
	"H. Peter Anvin" <hpa@zytor.com>
Subject: Re: [PATCH v2 01/13] initramfs: replace klibcdirs in Makefile with FORCE
Date: Tue, 7 Jan 2020 19:46:29 +0900	[thread overview]
Message-ID: <CAK7LNAS+SfvRRu=WHzh6eghBNusMiEaxuqj0L+5jnA0W=HOy+Q@mail.gmail.com> (raw)
In-Reply-To: <20200104150238.19834-2-masahiroy@kernel.org>

(+CC: Ben Hutchings, H. Peter Anvin)

On Sun, Jan 5, 2020 at 12:03 AM Masahiro Yamada <masahiroy@kernel.org> wrote:
>
> 'klibcdirs' was added by commit d39a206bc35d ("kbuild: rebuild initramfs
> if content of initramfs changes"). If this is just a matter of forcing
> execution of the recipe line, we can replace it with FORCE.
>
> I do not understand the purpose of
>
>    $(deps_initramfs): klibcdirs


Perhaps, the 'klibcdirs' target might be intended
to control the directory descending
in case klibc is dropped in the kernel tree.

Anyway, klibc is built independently
of Linux kernel, and this 'klibcdirs' target
is just a no-op stub as far as the kernel tree is concerned.

Clean it up.


> Remove it.
>
> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
> ---
>
> Changes in v2:
>   - New patch (I forgot to submit this in v1 series)
>
>  usr/Makefile | 6 +-----
>  1 file changed, 1 insertion(+), 5 deletions(-)
>
> diff --git a/usr/Makefile b/usr/Makefile
> index e6f7cb2f81db..55c942da01cd 100644
> --- a/usr/Makefile
> +++ b/usr/Makefile
> @@ -3,9 +3,6 @@
>  # kbuild file for usr/ - including initramfs image
>  #
>
> -klibcdirs:;
> -PHONY += klibcdirs
> -
>  suffix_y = $(subst $\",,$(CONFIG_INITRAMFS_COMPRESSION))
>  datafile_y = initramfs_data.cpio$(suffix_y)
>  datafile_d_y = .$(datafile_y).d
> @@ -50,13 +47,12 @@ targets := $(datafile_y)
>  # do not try to update files included in initramfs
>  $(deps_initramfs): ;
>
> -$(deps_initramfs): klibcdirs
>  # We rebuild initramfs_data.cpio if:
>  # 1) Any included file is newer than initramfs_data.cpio
>  # 2) There are changes in which files are included (added or deleted)
>  # 3) If gen_init_cpio are newer than initramfs_data.cpio
>  # 4) Arguments to gen_initramfs.sh changes
> -$(obj)/$(datafile_y): $(obj)/gen_init_cpio $(deps_initramfs) klibcdirs
> +$(obj)/$(datafile_y): $(obj)/gen_init_cpio $(deps_initramfs) FORCE
>         $(Q)$(initramfs) -l $(ramfs-input) > $(obj)/$(datafile_d_y)
>         $(call if_changed,initfs)
>
> --
> 2.17.1
>


-- 
Best Regards
Masahiro Yamada

  parent reply	other threads:[~2020-01-07 10:47 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-04 15:02 [PATCH v2 00/13] initramfs: a lot of cleanups Masahiro Yamada
2020-01-04 15:02 ` [PATCH v2 01/13] initramfs: replace klibcdirs in Makefile with FORCE Masahiro Yamada
2020-01-06  7:33   ` Greg Thelen
2020-01-07 10:46   ` Masahiro Yamada [this message]
2020-01-07 17:13     ` hpa
2020-01-04 15:02 ` [PATCH v2 02/13] gen_initramfs_list.sh: remove unused variable 'default_list' Masahiro Yamada
2020-01-06  7:34   ` Greg Thelen
2020-01-04 15:02 ` [PATCH v2 03/13] gen_initramfs_list.sh: fix the tool name in the comment Masahiro Yamada
2020-01-06  7:34   ` Greg Thelen
2020-01-04 15:02 ` [PATCH v2 04/13] initramfs: rename gen_initramfs_list.sh to gen_initramfs.sh Masahiro Yamada
2020-01-06  7:43   ` Greg Thelen
2020-01-06 10:26     ` Masahiro Yamada
2020-01-07  3:02       ` Ben Hutchings
2020-01-07  3:21       ` hpa
2020-01-04 15:02 ` [PATCH v2 05/13] initramfs: remove redundant dependency on BLK_DEV_INITRD Masahiro Yamada
2020-01-06  7:44   ` Greg Thelen
2020-01-04 15:02 ` [PATCH v2 06/13] initramfs: make compression options not depend on INITRAMFS_SOURCE Masahiro Yamada
2020-01-04 15:02 ` [PATCH v2 07/13] initramfs: make initramfs compression choice non-optional Masahiro Yamada
2020-01-04 15:02 ` [PATCH v2 08/13] initramfs: specify $(src)/gen_initramfs.sh as a prerequisite in Makefile Masahiro Yamada
2020-01-06  7:51   ` Greg Thelen
2020-01-04 15:02 ` [PATCH v2 09/13] initramfs: generate dependency list and cpio at the same time Masahiro Yamada
2020-01-04 15:02 ` [PATCH v2 10/13] initramfs: add default_cpio_list, and delete -d option support Masahiro Yamada
2020-01-04 15:02 ` [PATCH v2 11/13] gen_initramfs.sh: always output cpio even without -o option Masahiro Yamada
2020-01-04 15:02 ` [PATCH v2 12/13] initramfs: refactor the initramfs build rules Masahiro Yamada
2020-01-04 15:02 ` [PATCH v2 13/13] gen_initramfs.sh: remove intermediate cpio_list on errors Masahiro Yamada
2020-01-21 15:59 ` [PATCH v2 00/13] initramfs: a lot of cleanups Masahiro Yamada

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='CAK7LNAS+SfvRRu=WHzh6eghBNusMiEaxuqj0L+5jnA0W=HOy+Q@mail.gmail.com' \
    --to=masahiroy@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=ben@decadent.org.uk \
    --cc=gthelen@google.com \
    --cc=hpa@zytor.com \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sam@ravnborg.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).