GNU bug report logs -
#9625
Overriding `check:' target
Previous Next
To reply to this bug, email your comments to 9625 AT debbugs.gnu.org.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-automake <at> gnu.org
:
bug#9625
; Package
automake
.
(Wed, 28 Sep 2011 09:09:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Stefano Lattarini <stefano.lattarini <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-automake <at> gnu.org
.
(Wed, 28 Sep 2011 09:09:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Adding bug-automake]
Reference:
<http://lists.gnu.org/archive/html/automake/2011-09/msg00028.html>
Hi Jordi, thanks for the report.
On Tuesday 27 September 2011, Jordi Gutiérrez wrote:
> (Please cc: me as I'm not subscribed to the list)
>
> This may be a little frivolous, but in GNU Octave's top-level
> Makefile.am, we override the check: target:
>
Ah yes, you've hitten a known bug/limitation that I had already
encoutered, but the lamentably forgotten about (sorry!).
> http://hg.savannah.gnu.org/hgweb/octave/file/1bfca2bbea8b/Makefile.am#l106
>
> However, in the generated Makefile, this produces a warning:
>
> Makefile:2354: warning: overriding commands for target `check'
> Makefile:1948: warning: ignoring old commands for target `check'
>
> because the generated Makefile contains these lines:
>
> ## Standard target
> check: $(BUILT_SOURCES)
> $(MAKE) $(AM_MAKEFLAGS) check-recursive
>
JFTR, If I understand things correctly, this hackish recipe is really
required to ensure that $(BUILT_SOURCES) are effectively built not
only before the `check' target, but also before all its "built-in"
dependencies (`check-local', `check-am' and `check-recusrsive', mostly).
> ## Overriden target
> check: all
> $(MAKE) -C test check
>
Just a question: why this overriding? If the `test' directory is
listed in SUBDIRS, the automake-generated `check' target will take
care of automatically recursing into `test' anyway. Or am I missing
something about Octave's source tree setup?
> I would like to silence that warning.
>
If you can, I suggest you to just drop the `check:' overriding, and let
Automake handle the recusrions automatically. If you can't do so, I'll
take a better look to see if we can work out another solution.
> It clutters my compilation
> buffer when I'm in Emacs and want to quickly jump to the first error
> or warning with C-x `. It would suffice if I could make the check:
> target empty. Can you please explain under what conditions the check:
> target actually has a script involved?
>
You mean a "recipe involved" here, right? If yes, that happens iff the
BUILT_SOURCES variable is defined.
> I tried making a minimal
> example of my own with Automake, and it produced something like this:
>
> ...
> check: check-recursive
> all-am: Makefile config.h
> ...
>
> i.e. an empty target. So I can override check: without getting a
> warning.
>
In truth, automake is *not* letting you override it; you are "just"
adding additional dependencies and a recipe to it -- but make finds
this legitimate of course, so it won't complain.
> When does this happen? When is the check: target empty
> and when does it actually have a command in there?
>
Automake should provide a recipe to the `check' target iff the
`BUILT_SOURCES' variable is defined.
HTH,
Stefano
Information forwarded
to
bug-automake <at> gnu.org
:
bug#9625
; Package
automake
.
(Wed, 28 Sep 2011 16:35:01 GMT)
Full text and
rfc822 format available.
Message #8 received at submit <at> debbugs.gnu.org (full text, mbox):
(Please cc: me as I'm not subscribed to the list)
On 28 September 2011 04:06, Stefano Lattarini
<stefano.lattarini <at> gmail.com> wrote:
> [Adding bug-automake]
>
> Reference:
> <http://lists.gnu.org/archive/html/automake/2011-09/msg00028.html>
>
> Hi Jordi, thanks for the report.
>
> On Tuesday 27 September 2011, Jordi Gutiérrez wrote:
>
>>
>> This may be a little frivolous, but in GNU Octave's top-level
>> Makefile.am, we override the check: target:
>>
>> http://hg.savannah.gnu.org/hgweb/octave/file/1bfca2bbea8b/Makefile.am#l106
>
> Ah yes, you've hitten a known bug/limitation that I had already
> encoutered, but the lamentably forgotten about (sorry!).
Huh, so this is an automake bug?
>>
>> However, in the generated Makefile, this produces a warning:
>>
>> Makefile:2354: warning: overriding commands for target `check'
>> Makefile:1948: warning: ignoring old commands for target `check'
>>
>> because the generated Makefile contains these lines:
>>
>> ## Standard target
>> check: $(BUILT_SOURCES)
>> $(MAKE) $(AM_MAKEFLAGS) check-recursive
>>
> JFTR, If I understand things correctly, this hackish recipe is
> really required to ensure that $(BUILT_SOURCES) are effectively
> built not only before the `check' target, but also before all its
> "built-in" dependencies (`check-local', `check-am' and
> `check-recusrsive', mostly).
>
>> ## Overriden target
>> check: all
>> $(MAKE) -C test check
>>
> Just a question: why this overriding?
It's simply so that "make check" will contain the test output as the
last bit of output. Without this, the tests are run, but the output is
cluttered with "make[2]: Leaving directory..." output and similar.
>> When does this happen? When is the check: target empty
>> and when does it actually have a command in there?
>>
> Automake should provide a recipe to the `check' target iff the
> `BUILT_SOURCES' variable is defined.
I see. Yes, we do define that variable, as you can see above in the
Makefile.am in our VCS.
- Jordi G. H.
Information forwarded
to
bug-automake <at> gnu.org
:
bug#9625
; Package
automake
.
(Wed, 28 Sep 2011 19:16:02 GMT)
Full text and
rfc822 format available.
Message #11 received at submit <at> debbugs.gnu.org (full text, mbox):
On Wednesday 28 September 2011, Jordi Gutiérrez wrote:
> (Please cc: me as I'm not subscribed to the list)
>
> On 28 September 2011 04:06, Stefano Lattarini
> <stefano.lattarini <at> gmail.com> wrote:
> > [Adding bug-automake]
> >
> > Reference:
> > <http://lists.gnu.org/archive/html/automake/2011-09/msg00028.html>
> >
> > Hi Jordi, thanks for the report.
> >
> > On Tuesday 27 September 2011, Jordi Gutiérrez wrote:
> >
> >>
> >> This may be a little frivolous, but in GNU Octave's top-level
> >> Makefile.am, we override the check: target:
> >>
> >> http://hg.savannah.gnu.org/hgweb/octave/file/1bfca2bbea8b/Makefile.am#l106
> >
> > Ah yes, you've hitten a known bug/limitation that I had already
> > encoutered, but the lamentably forgotten about (sorry!).
>
> Huh, so this is an automake bug?
>
This is fuzzy: it can be seen either as a bug or as a limitation. In
theory, every automake-provided target should be overridable, which
suggests the behaviour you are observing is a bug. But apparently the
`all' and `check' targets are special enough to deserve a special
treatment, especially when BUILT_SOURCES is involved; so the fact they
cannot be overridden can be seen as an unfortunate, but not gratuitous,
limitation.
Anyway, changing the current behaviour might be tricky and break other
usages "in the wild", so it's not something I want to do lighlty (even
if documenting it might be worthwhile). So, IMHO the best fix for your
problem is to change the Octave's Makefile.am, if possible.
> >>
> >> However, in the generated Makefile, this produces a warning:
> >>
> >> Makefile:2354: warning: overriding commands for target `check'
> >> Makefile:1948: warning: ignoring old commands for target `check'
> >>
> >> because the generated Makefile contains these lines:
> >>
> >> ## Standard target
> >> check: $(BUILT_SOURCES)
> >> $(MAKE) $(AM_MAKEFLAGS) check-recursive
> >>
> > JFTR, If I understand things correctly, this hackish recipe is
> > really required to ensure that $(BUILT_SOURCES) are effectively
> > built not only before the `check' target, but also before all its
> > "built-in" dependencies (`check-local', `check-am' and
> > `check-recusrsive', mostly).
> >
> >> ## Overriden target
> >> check: all
> >> $(MAKE) -C test check
> >>
> > Just a question: why this overriding?
>
> It's simply so that "make check" will contain the test output as the
> last bit of output. Without this, the tests are run, but the output is
> cluttered with "make[2]: Leaving directory..." output and similar.
>
Is this really much a problem? Can't you just ignore these extra lines,
or call make with the `--no-print-directory' option?
BTW, if the Octave testsuite uses the Automake-provided harness, you could
enable colorized tests output, which makes pretty easy to ignore noise
when visually scanning the testsuite output.
> >> When does this happen? When is the check: target empty
> >> and when does it actually have a command in there?
> >>
> > Automake should provide a recipe to the `check' target iff the
> > `BUILT_SOURCES' variable is defined.
>
> I see. Yes, we do define that variable, as you can see above in the
> Makefile.am in our VCS.
>
Yes, I've noticed that :-)
HTH,
Stefano
Severity set to 'minor' from 'normal'
Request was from
Stefano Lattarini <stefano.lattarini <at> gmail.com>
to
control <at> debbugs.gnu.org
.
(Wed, 07 Dec 2011 22:54:02 GMT)
Full text and
rfc822 format available.
This bug report was last modified 13 years and 239 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.