On Sat, Jul 24, 2021 at 6:21 AM Kaz Kylheku (gmake) <[email protected]> wrote: > > On 2021-07-23 09:48, Masahiro Yamada wrote: > > Hi. > > > > > > GNU Make deletes partially updated target files > > when it is interrupted. > > Yes, unless the targets are mentioned in the > .PRECIOUS: special target. > > The description of PRECIOUS leads to the documentation > section "Interrupting or Killing 'make'" which > describes the requirements and rationale. > > > I am interested in this behavior. > > I did not look into the source code, > > but did some experiments to understand how GNU > > Make behaves. > > > > Ctrl-C is a normal way to terminate GNU Make. > > Well, not really depending on what we mean by > "normal". A build usually runs to successful > or failed completion.
Sorry if it was confusing. I mean, Ctrl-C is a normal way when people want to terminate the build before completion. > Using Ctrl-C is usual in interactive development, > so the behavior seen here could be an annoyance > in the right circumstances. > > I don't see this being an issue in CI pipelines. > > CI systems that can interrupt builds will typically > not re-run builds incrementally the same sandbox; > if an interrupted build is retriggered, it will be > done from scratch in a fresh sandbox. CI is not the only way for building. When people build a project manually, they want to be able to terminate it by Ctrl-C any time, and resume 'make' later, and want it to work properly. -- Best Regards Masahiro Yamada
