Re: [RFC PATCH v2 2/2] kbuild: call check-atomics.sh only if prerequisites change

From: Vincent MAILHOL
Date: Fri May 13 2022 - 23:21:44 EST


On Sat. 14 May 2022 at 04:01, Masahiro Yamada <masahiroy@xxxxxxxxxx> wrote:
> On Sat, May 7, 2022 at 10:13 PM Vincent Mailhol
> <mailhol.vincent@xxxxxxxxxx> wrote:
> >
> > check-atomics.sh is executed unconditionally. Most developers will not
> > modify the files being checked by this script and thus do not need to
> > execute it again for each iterative make.
> >
> > We first add an additional dependency to include/linux/atomic/* to
> > make sure that the script gets executed again if the headers are
> > modified. We then use the if_change macro instead of cmd. c.f. [1] and
> > create the dot file scripts/atomic/.check-atomics which is used for
> > the target timestamp. Finally, the dot file is added to the
> > CLEAN_FILES target.
> >
> > [1] https://www.kernel.org/doc/html/latest/kbuild/makefiles.html#command-change-detection
> >
> > Signed-off-by: Vincent Mailhol <mailhol.vincent@xxxxxxxxxx>
>
>
> I do not like this approach.
>
> I wrote a different patch.
> https://lore.kernel.org/lkml/20220513185340.239753-1-masahiroy@xxxxxxxxxx/T/#u
>
> This naturally works by comparing the timestamp
> between *_shipped and include/generated/*.

Thank you very much for taking the time to fully rewrite it in order
to simply discard the check-atomics.sh. I like the idea.