Re: [PATCH] kbuild: unify cmd_copy and cmd_shipped

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jan 26, 2022 at 7:11 AM Gabriel Krisman Bertazi
<krisman@xxxxxxxxxxxxx> wrote:
>
> Nick Desaulniers <ndesaulniers@xxxxxxxxxx> writes:
>
> > On Mon, Jan 24, 2022 at 10:41 PM Masahiro Yamada <masahiroy@xxxxxxxxxx> wrote:
> >>
> >> cmd_copy and cmd_shipped have similar functionality. The difference is
> >> that cmd_copy uses 'cp' while cmd_shipped 'cat'.
> >>
> >> Unify them into cmd_copy because this macro name is more intuitive.
> >>
> >> Going forward, cmd_copy will use 'cat' to avoid the permission issue.
> >> I also thought of 'cp --no-preserve=mode' but this option is not
> >> mentioned in the POSIX spec [1], so I am keeping the 'cat' command.
> >>
> >> [1]: https://pubs.opengroup.org/onlinepubs/009695299/utilities/cp.html
> >> Signed-off-by: Masahiro Yamada <masahiroy@xxxxxxxxxx>
> >> ---
> >>
> >>  arch/microblaze/boot/Makefile     |  2 +-
> >>  arch/microblaze/boot/dts/Makefile |  2 +-
> >>  fs/unicode/Makefile               |  2 +-
> >>  scripts/Makefile.lib              | 12 ++++--------
> >>  usr/Makefile                      |  4 ++--
> >>  5 files changed, 9 insertions(+), 13 deletions(-)
> >>
> >> diff --git a/arch/microblaze/boot/Makefile b/arch/microblaze/boot/Makefile
> >> index cff570a71946..2b42c370d574 100644
> >> --- a/arch/microblaze/boot/Makefile
> >> +++ b/arch/microblaze/boot/Makefile
> >> @@ -29,7 +29,7 @@ $(obj)/simpleImage.$(DTB).ub: $(obj)/simpleImage.$(DTB) FORCE
> >>         $(call if_changed,uimage)
> >>
> >>  $(obj)/simpleImage.$(DTB).unstrip: vmlinux FORCE
> >> -       $(call if_changed,shipped)
> >> +       $(call if_changed,copy)
> >>
> >>  $(obj)/simpleImage.$(DTB).strip: vmlinux FORCE
> >>         $(call if_changed,strip)
> >> diff --git a/arch/microblaze/boot/dts/Makefile b/arch/microblaze/boot/dts/Makefile
> >> index ef00dd30d19a..b84e2cbb20ee 100644
> >> --- a/arch/microblaze/boot/dts/Makefile
> >> +++ b/arch/microblaze/boot/dts/Makefile
> >> @@ -12,7 +12,7 @@ $(obj)/linked_dtb.o: $(obj)/system.dtb
> >>  # Generate system.dtb from $(DTB).dtb
> >>  ifneq ($(DTB),system)
> >>  $(obj)/system.dtb: $(obj)/$(DTB).dtb
> >> -       $(call if_changed,shipped)
> >> +       $(call if_changed,copy)
> >>  endif
> >>  endif
> >>
> >> diff --git a/fs/unicode/Makefile b/fs/unicode/Makefile
> >> index 2f9d9188852b..74ae80fc3a36 100644
> >> --- a/fs/unicode/Makefile
> >> +++ b/fs/unicode/Makefile
> >> @@ -31,7 +31,7 @@ $(obj)/utf8data.c: $(obj)/mkutf8data $(filter %.txt, $(cmd_utf8data)) FORCE
> >>  else
> >>
> >>  $(obj)/utf8data.c: $(src)/utf8data.c_shipped FORCE
> >
> > do we want to retitle the _shipped suffix for this file to _copy now, too?
> > fs/unicode/Makefile:11
> > fs/unicode/Makefile:33
> > fs/unicode/Makefile:34
>
> I think _copy doesn't convey the sense that this is distributed with the
> kernel tree, even though it is also generated from in-tree sources.
> Even if that is not the original sense of _shipped (is it?), it makes
> sense to me that way, but _copy doesn't.
>
> The patch looks good to me, though.
>
> Reviewed-by: Gabriel Krisman Bertazi <krisman@xxxxxxxxxxxxx>
>
>
> >

I only renamed the action part (cmd_shipped -> cmd_copy)
because I thought it was clearer.

Actually I do not get the sense of _shipped pretty much, but
I think we can keep the file suffix part (utf8data.c_shipped) as is.


-- 
Best Regards
Masahiro Yamada



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux