[Top][All Lists]

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

Re: Problem with circular dependencies

From: Stefano Lattarini
Subject: Re: Problem with circular dependencies
Date: Mon, 16 Sep 2013 11:51:57 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130804 Thunderbird/17.0.8

On 09/15/2013 11:12 PM, Diego Elio Pettenò wrote:
On Sun, Sep 15, 2013 at 7:16 PM, Jules Colding <address@hidden>wrote:

So, how do I tell the top-level that it should traverse all
sub-directories building only the libraries, and then traverse the
sub-directories again building only the test applications?

You don't.

This is one of the reasons why you shouldn't be using recursive makefiles...

I agree.  As soon as your subdirectories start to have non-trivial
interdependencies (or even trivial ones IMHO), you should definitely
switch to a non-recursive build setup if you want to avoid subtle
bugs and inconsistencies (and retain your sanity in the long term).

See also the famous paper "Recursive make considered harmful" for details:

Automake 1.14 should now make it easier to have non-recursive setups, thanks
to the new "Relative directory in Makefile fragments" feature (see NEWS file
for details, or read them on-line at
Again, kudos to Peter Rosin for implementing most of that feature).


reply via email to

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