[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAK7LNAR_59AAEQ8wZzpmi5M4SyGspUGdyFgOqQR689DmpE_RCQ@mail.gmail.com>
Date: Tue, 17 May 2022 12:02:52 +0900
From: Masahiro Yamada <masahiroy@...nel.org>
To: Rob Herring <robh@...nel.org>
Cc: Krzysztof Kozlowski <krzk+dt@...nel.org>,
DTML <devicetree@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] dt-bindings: Remove example file on dt-extract-example error
On Tue, May 17, 2022 at 10:12 AM Rob Herring <robh@...nel.org> wrote:
>
> On Wed, May 11, 2022 at 09:27:00AM +0900, Masahiro Yamada wrote:
> > On Wed, May 11, 2022 at 7:13 AM Rob Herring <robh@...nel.org> wrote:
> > >
> > > As 'dt-extract-example' writes the example dts files to stdout, a file
> > > is always created even on an error such as Ctrl-C. The resulting empty
> > > file(s) then cause unexpected errors on subsequent builds. Fix this by
> > > removing the output file on any error.
> > >
> >
> >
> > Did you really set it?
>
> Set what?
Sorry for the typo. I meant "Did you really see it?"
>
> I'm sure I've gotten empty files which then throw errors on the next
> run.
Hmm, OK.
When you observed this issue, were you using
a pipe to another program?
For example,
$ make dt_binding_check 2>&1 | tee dt_binding_check.log
> > The target deletion on interrupt is automatic
> > since the following commit:
> >
> >
> >
> > commit 9c2af1c7377a8a6ef86e5cabf80978f3dbbb25c0
> > Author: Masahiro Yamada <yamada.masahiro@...ionext.com>
> > Date: Fri Jul 20 16:46:33 2018 +0900
> >
> > kbuild: add .DELETE_ON_ERROR special target
>
> You're saying I shouldn't need this change? For some reason I do...
>
> Rob
If .DELETE_ON_ERROR works as the manual [1] explains,
[1] https://www.gnu.org/software/make/manual/make.html#Special-Targets
the deletion of the target is automatic.
Basically, it worked like that, except when Make is piped to another program.
I asked this in GNU Make ML before.
When Make is piped to another program, which is terminated by Ctrl-C,
Make is also killed by SIGPIPE before cleaning up the incomplete targets.
--
Best Regards
Masahiro Yamada
Powered by blists - more mailing lists