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/Makefile.in would contain n dependency rules. Adding a file to subdirN/Makefile.am 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. ./configure make ... debug, encounter bug ... cd subdir make clean make CFLAGS="-g" cd .. make > Perhaps > the desire to do "make clean" in a subdirectory is aquired bad > behavior? Nope, it's a feature, related to usability addressing developers. Ralf