lkml.org 
[lkml]   [2022]   [Dec]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH v3 3/5] kbuild: add read-file macro
Date
From: Alexander Lobakin <alexandr.lobakin@intel.com>
Date: Wed, 7 Dec 2022 16:40:44 +0100

> From: Masahiro Yamada <masahiroy@kernel.org>
> Date: Sun, 27 Nov 2022 07:56:22 +0900
>
> > Since GNU Make 4.2, $(file ...) supports the read operater '<', which
> > is useful to read a file without forking any process. No warning is
> > shown even if the input file is missing.

[...]

> Great stuff. Used it in my upcoming series to simplify things, works
> as expected.
>
> sed-syms = $(subst $(space),\|,$(foreach file,$(sym-files-y),$(call read-file,$(file))))
>
> The only thing that came to my mind while I was implementing the
> oneliner above: maybe add ability to read multiple files? For now,
> I used a foreach, could it be somehow incorporated into read-file
> already?

Oh, nevermind. This one also works:

sed-syms = $(subst $(space),\|,$(call read-file,$(sym-files-y)))

So I believe read-file works for an arbitrary number of files.

>
> Besides that:
>
> Reviewed-and-tested-by: Alexander Lobakin <alexandr.lobakin@intel.com>

[...]

> > --
> > 2.34.1
>
> Thanks,
> Olek

Thanks!
Olek

\
 
 \ /
  Last update: 2022-12-07 17:27    [W:0.053 / U:0.480 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site