On Thu, 2007-04-12 at 04:19 +0200, Jim Meyering wrote:
> > The real key to this problem is that Automake generates the following
> > very strange rule:
> >
> > check-am: all-am
> >         $(MAKE) $(AM_MAKEFLAGS) $(check_LTLIBRARIES)
> >         $(MAKE) $(AM_MAKEFLAGS) check-TESTS
> >
> > With the result that there are *two* instances of make running
> > simultaneously when you make check with -j. As long as they are building
> > disjoint sets of targets it works, but I can't figure out why on earth
> > automake would do that instead of:
> 
> Automake's rule ensures that the following are built in order:
>     all-am
>     check_LTLIBRARIES
>     check-TESTS
> 
> > check-am: check-TESTS
> > check-TESTS: $(TESTS) $(check_LTLIBRARIES)
> 
> Doing it this way would mistakenly let some of the latter rules
> run before the all-am ones, when run via make -jN.

What's wrong with that? If some of the latter rules can be built in
parallel with all-am, so much the better in a -jN build. 

If you did want to forcibly allow all-am to complete first it can
probably be done via dependencies also rather than sub-makes, something
like
$(check_LTLIBRARIES): all-am
$(check-TESTS): all-am

Cheers,
Alan.

Reply via email to