Subject: Re: make includes optimization
To: None <erh@netbsd.org>
From: Chris G. Demetriou <cgd@netbsd.org>
List: tech-install
Date: 02/14/2000 12:22:57
[ one more swing at the horse and i'm done... 8-]

erh@nimenees.com writes:
> On Sun, Feb 13, 2000 at 01:51:19PM -0800, Chris G. Demetriou wrote:
> > (1) using '.if ... make( ...' for anything, ever, is broken.  yes, i
> > know that some things already use it, but they should be considered
> > broken.  (what happens if you say 'make includes all install' or
> > similar?)
> 	well, then I would consider make to be broken.  make a b c
> should be the same as make a && make b && make c.

I don't think so.  If you say 'make a b c', you want the dependencies
evaluated only once.

consider the overly-simplistic case:

.PHONY: foo

foo:
	echo FOO!

a b c: foo
	echo $@

'make a b c' will run the rules for 'foo' once, 'make a && make b &&
make c' will do it three times.  While the problem is obvious when
.PHONY targets are used, doing the makes separately obviously cause
more system activity than a single make.  8-)


As an aside: Really, as far as i'm concerned, the make constructs
which are evaluated 'in line' (if, for, etc.) are kind of evil, since
they make the make language much less 'functional' (if you look at it
with the tint in your lenses 8-).  Some breakeage is worse than
others, though, and i think 'if make(...)' is one of the most
annoying.  8-)


cgd
-- 
Chris Demetriou - cgd@netbsd.org - http://www.netbsd.org/People/Pages/cgd.html
Disclaimer: Not speaking for NetBSD, just expressing my own opinion.