[Top][All Lists]

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

Re: Non-recursive makefiles

From: Ralf Corsepius
Subject: Re: Non-recursive makefiles
Date: Tue, 06 Jun 2006 07:02:40 +0200

On Tue, 2006-05-30 at 12:23 -0500, Bob Friesenhahn wrote:
> On Mon, 29 May 2006, Stefan Puiu wrote:
> > However, people haven't mentioned yet the main point in Peter Miller's
> > paper - dependency handling, which I think is very important
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:

subdirN/* ... n files
subdirM/* ... m files

with no file in subdirN depending on any file in subdirM.
with n = 20 and m = 500

Now add a file to n.

In a non flat layout subdirN/ would contain n dependency
rules. Adding a file to subdirN/ would require to compute n+1
(21) dependency rules.

In a flat layout Makefile would contain m+n (520) dependency rules.
Adding a file to subdirN would require automake to compute m+n+1 (520)
dependency rules.

> There should be no need to type "make clean" in a subdirectory.  Doing 
> so is a rank admission that the build system is broken.
Yes, that's one of such situations - A case you probably trip over
rather frequently when developing on a package or when bug-hunting.

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

... debug, encounter bug ...

cd subdir
make clean
make CFLAGS="-g"
cd ..

> Perhaps 
> the desire to do "make clean" in a subdirectory is aquired bad 
> behavior?
Nope, it's a feature, related to usability addressing developers.


reply via email to

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