[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#9625: Overriding `check:' target

From: Jordi Gutiérrez Hermoso
Subject: bug#9625: Overriding `check:' target
Date: Wed, 28 Sep 2011 09:09:57 -0500

(Please cc: me as I'm not subscribed to the list)

On 28 September 2011 04:06, Stefano Lattarini
<address@hidden> 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.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]