+1 for namespaces in make

I'm also maintaining a big, multi-component makefile. All submakes are
included in the main, and I have to manually add some kind of prefix to the
target names in each file. What I would like to see is something like:

   include <some makefile> as <namespace>

This kind of include would add an automatic prefix to all (phony) targets
and allow, for example, each submake to have an 'all' or 'install' target of
its own, as well as private variables.

Avishay

2011/7/24 Philip Guenther <[email protected]>

> On Sat, Jul 23, 2011 at 4:15 PM, Kohn Gilispi <[email protected]>
> 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
>
> _______________________________________________
> Help-make mailing list
> [email protected]
> https://lists.gnu.org/mailman/listinfo/help-make
>
_______________________________________________
Help-make mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/help-make

Reply via email to