Subject: Re: Moving some script magic out of bsd.pkg.mk
To: None <hubert.feyrer@informatik.fh-regensburg.de>
From: David Brownlee <abs@netbsd.org>
List: tech-pkg
Date: 01/07/2000 01:09:03
  This message is in MIME format.  The first part should be readable text,
  while the remaining parts are likely unreadable without MIME-aware tools.
  Send mail to mime@docserver.cac.washington.edu for more info.

--0-1383104635-947203682=:4421
Content-Type: TEXT/PLAIN; CHARSET=US-ASCII
Content-ID: <Pine.NEB.4.21.0001070103591.4421@oblivion.mono.org>

On Thu, 6 Jan 2000, Hubert Feyrer wrote:

> On Thu, 6 Jan 2000, Tim Rightnour wrote:
> > I'd be very interested in seeing some timing runs with some of this done.  The
> > current time to build some large-dependency packages is becoming hideous.  I
> > watched my wife's machine just sit at "validating dependencies" for 10 minutes
> > today.
> 
> The problem here is recursive make calls. 
> Which - as far as I understand - david didn't want to unroll.

	As it just so happens... :)

	Make spends _far_ too long parsing .mk files (~ a second on my
	laptop), so additional make calls are very expensive.

	An empty gnumeric 'make fetch' (all sources present) takes over
	2 minutes with 78 make calls.

	Calculating PKGTOOLS_VERSION inline in the first make call, and
	passing it in the environment saves > 15% time on my 'make fetch'.
	It will save a little less on some other operations, but should
	always be a win.

	Diffs attached - I'll keep hunting for make calls to trim while
	we wait on script extraction consensus :)
	I also define a PKG_TOOLS_BIN in each OS block, and use it to
	define each PKG_<TOOLNAME> later - I prefer the look but happy
	to drop this.

	One thing that does confuse me - why do we have:

.if !target(fetch)
fetch:  
        @cd ${.CURDIR} && ${MAKE} ${.MAKEFLAGS} real-fetch
.endif

	and not just

.if !target(fetch)
fetch:	real-fetch

.endif


	Thanks.

	
	


		David/absolute



--0-1383104635-947203682=:4421
Content-Type: TEXT/PLAIN; charset=US-ASCII; name=diff
Content-Transfer-Encoding: BASE64
Content-ID: <Pine.NEB.4.21.0001070109030.4421@oblivion.mono.org>
Content-Description: 
Content-Disposition: attachment; filename=diff

LS0tIGJzZC5wa2cubWsub3JpZwlUaHUgSmFuICA2IDEwOjA5Oj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