[lfs-dev] 6.17. GCC-6.2.0 - purpose of the -k parameter in make -k check
lfs65 at cruziero.com
Wed Aug 31 02:26:03 PDT 2016
> From: Wayne Blaszczyk <wblaszcz at bigpond.net.au>
> Date: Wed, 31 Aug 2016 18:49:38 +1000
> Subject: Re: [lfs-dev] 6.17. GCC-6.2.0 - purpose of the -k parameter in make
> -k check
> On Tue, 2016-08-30 at 22:02 -0500, Bruce Dubbs wrote:
> > Wayne Blaszczyk wrote:
> > > On Tue, 2016-08-30 at 14:45 +0200, Pierre Labastie wrote:
> > > > On 30/08/2016 11:28, Wayne Blaszczyk wrote:
> > > > > Hi,
> > > > >
> > > > > I'm curious on what the intent of having the -k parameter in make -k check.
> > > > > To this point in time I always thought it was to continue with the tests even
> > > > > after unexpected test failures. But after removing the -k, the only error I got early on was
> > > > >
> > > > > autogen -T ../../fixincludes/check.tpl ../../fixincludes/inclhack.def
> > > > > make: autogen: Command not found
> > > > >
> > > > > which caused an early halt.
> > > > > With autogen installed, make check seemed to complete all the tests even though not all of them were successful.
> > > > We do not give any recipe for autogen, so it is assumed that it is
> > > > not installed, hence the "-k", to prevent "make check" from failing
> > > > early.
> > > Yes, but should that not be explained in the text? i.e. Why we are doing it.
> > We don't explain every option for every command. It should be fairly easy
> > to 'man make':
> > -k, --keep-going
> > Continue as much as possible after an error. While the
> > target that failed, and those that depend on it, cannot be remade, the
> > other dependencies of these targets can be processed all the same.
> > -- Bruce
> I'm not saying what option -k does, but why we are we doing it. man is not going to tell you why. If it's because autotools is not installed and it is a dependency for this target, then it should be
> stated rather than saying bypass any errors. I just thought it might be beneficial as a learning point.
I'd agree - at least broadly - with Wayne on this.
'make -k' buries/mixes errors in the output: if the 'make -k' ultimately
fails, then that's a signal to backtrack to fix errors; but if the 'make
-k' completes, then how do you know what errors have been encountered
but continued past.
Because of that, & AAFK, although use of 'make -k' for tests/debugs is
fairly standard practice, it is usually considered to be potentially
'dangerous' if you don't really know the code behaviour enough.
If the '-k' is to continue past the known, single issue re autogen,
then just say that: but how can you guarantee that that will be the
only error that has been skipped past; how do you instruct the user to
proceed if 'make -k' completes.
To just instruct folks to use 'make -k' is not really educational: what
errors might they be missing, is a reasonably intelligent question;
and the text doesn't comment on that.
Is there a way - e.g. some env-var - to do the make-check, without uisng
'-k', and allowing for autogen being not present.
I'll note also that gcc dev lists have some history over this
More information about the lfs-dev