On Tue, 16 Dec 2003, Noel Yap wrote:

> In a recursive makefile structure, rather than running make for the
> subdirectories, each subdirectory will publish how to build its stuff
> via a makefile that gets included.  For example, it may have something
> like:
> 
> # contents of d1/GNUbuild.mk
> build: build-d1
> 
> #clean:               # don't have to include this since there's nothing to clean in 
> d1
> 
> Within the top-level makefile, you'd do something like:
> 
> -include $(addsuffix /GNUbuild.mk.mk,$(TARGETS))

i have one concern with the above (at least, if i read it correctly).
this looks like the technique used in the 2.4 kernel top-level makefile,
which has the line:

  include arch/$(ARCH)/Makefile    # ARCH=ppc for example

which contains a rule for how to build the "vmlinux" target.  fair enough,
but the problem with this direct inclusion is that that lower-level
makefile has to continue to refer to files relative to the top level, so
it's full of "arch/ppc/this" and "arch/ppc/that" references.

  this strikes me as somewhat cumbersome -- designing a Makefile for the
arch/ppc directory, and knowing it will be included from above which means
i have to keep qualifying everything with "arch/ppc" -- something a
recursive makefile wouldn't have to do.

  wouldn't the approach you suggest here have the same issue?  i'm 
finally getting the time to start going over that paper by miller, so
we'll see if i misunderstood this, but i don't see how you could avoid
it.

rday




_______________________________________________
Help-make mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/help-make

Reply via email to