help-make
[Top][All Lists]
Advanced

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

Re: namespaces a solution to recursive make issues?


From: Philip Guenther
Subject: Re: namespaces a solution to recursive make issues?
Date: Sun, 24 Jul 2011 13:31:22 -0700

On Sat, Jul 23, 2011 at 4:15 PM, Kohn Gilispi <address@hidden> wrote:
> A rather large
> project I am part of uses recursive makefiles. Although "considered
> harmful", this has the benefit of being able to invoke "make" at
> any arbitrary module/package subdirs.

You can do that with a non-recursive set up too, so that shouldn't be
deciding factor.  When I converted a good-sized project from recursive
to non-recursive, I placed a GNUMakefile in each subdir that set a
variable to the current directory and then included the toplevel
Makefile (which included all the Makefile.inc files in the subdirs).
That variable, when set, was used as a filter on the libraries and
binaries that were set as the prerequisites for the default target
(named "here").

The result was that "make" (or "make here") would build just the
libraries and binaries whose source was 'below' your current
directory, along with whatever dependencies they had elsewhere in the
tree.  "make all" would always build the entire tree, no matter what
your current directory was.


Philip Guenther



reply via email to

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