On Mon, Mar 29, 2010 at 06:45:42PM +0200, Simon Bertrang wrote:
> On Fri, Mar 26, 2010 at 12:09:48PM +0100, Marc Espie wrote:
> > I've been using this a few times, and it's really useful for tweaking
> > big makefiles in ports, or very compact for other stuff.
> > 
> > It's like this, both our make(1) and gmake(1) support recursive variables,
> > so that:
> [snip]
> 
> ... you have a really strong hammer:
> 
yeah, of course, it is a really strong hammer.
With our Make logic, you don't even have to change the basic .c.o rules,
you can even simply do:
CFLAGS += ${CFLAGS$*}

or
CFLAGS += ${cfla...@}

and it will work. ;-)

This can be fairly nasty, fairly quickly, obviously.

I'm really thinking about looking at this more at some point.  There are some
issues with files having the same name and objdir names, but it's part of 
a possible solution of tweaking the SUBDIR handling part of src/bin to try to 
build *all* programs in parallel (or at least most of them) insted of doing
them one at a time (which of course would help make -jN a great deal, since
there are quite a few programs with just a few source files). I estimate you
would probably win >20% of build time with as few as 4 cores available...

Reply via email to