automake
[Top][All Lists]
Advanced

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

Re: Non-recursive makefiles


From: Stefan Puiu
Subject: Re: Non-recursive makefiles
Date: Tue, 6 Jun 2006 09:49:14 +0300

Hi,

On 6/6/06, Ralf Corsepius <address@hidden> wrote:
Well, that's one of those cases I'd prefer to call "urban legends" of
"flat makefiles".

Yes, in an ideal world, a flat makefile can take all dependencies. But
in real world a complex package consists of more or less independent
subpackages, or of a strict subpackage hierarchy.

Now consider this:
[...]

As I was saying, if you have subdirs with no dependencies between each
other, probably you don't need a flat makefile. However, the situation
in our project is different (also due to bad dependency design).

One question about your example - wouldn't adding one file to subdirM
and then typing make in the top-level dir still have make compute 521
dependencies? Together with the overhead of recursive calls to make.

>   Why else
> would someone want to do a "make clean" in a subdirectory?
E.g. when debugging a subpackage.

./configure
 [...]

I have a very similar example - let's say you have a library in
lib1/libsome.a and a binary in bin/, and the binary depends on
libsome.a. In recursive make setups, when you want to debug the
binary, you need to rebuild the library, rebuild the binary and then
retry (make -C lib1 && make -C bin), instead of just 'make binary'.
You can also set per-target flags in Makefile.am subdir files if you
want a certain part compiled with debugging support, I guess, so it's
not that different.

I agree non-recursive make is not an universal solution, but I think
it can still be useful in certain project setups - especially those
where making the build system notice a file change requires two or
more runs of 'make'.

Just my 2 cents,
Stefan.




reply via email to

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