Subject: Re: [Linux] why isn't ${TEST} the shell builtin?
To: Roland Illig <roland.illig@gmx.de>
From: grant beattie <grant@NetBSD.org>
List: tech-pkg
Date: 07/04/2004 00:23:48
--0IvGJv3f9h+YhkrH
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Mon, Jun 28, 2004 at 12:10:36AM +0200, Roland Illig wrote:

> It's a speed increase of 40% clock time and 70% kernel time. So I wonder=
=20
> why ${TEST} is not defined to be the shell builtin in=20
> $PKGSRC/mk/defs.Linux.mk.
>=20
> NB: I also tried the shell builtin test on Solaris but failed.

what version of Solaris? what is your ${SH} set to?

I'm testing it now on Solaris 9 with SH=3D/bin/ksh (as per
defs.SunOS.mk) and these are timings from building libtool-base:

TEST=3D/usr/bin/test
% time bmake
120.29u 161.99s 4:47.22 98.2%

TEST=3Dtest
% time bmake
59.15u 51.58s 1:51.15 99.6%

pretty impressive :)

I had to tweak a couple of uses of ${TEST} and -e in bsd.pkg.mk, but
these can be abstracted (the only other platform which has a picky
built-in 'test' is IRIX 5.3 afaik).

I'm going to try building a bunch more stuff and if all is well I
think it's definitely worth the time saving :-)

grant.


--0IvGJv3f9h+YhkrH
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (NetBSD)

iD8DBQFA5sF0luYOb9yiFXoRAkSfAKCBgZDyR+aTnsFAGy1atzDnGxwudACeJld4
VthRsSfOfFjMGG+63eQMYyY=
=fgGD
-----END PGP SIGNATURE-----

--0IvGJv3f9h+YhkrH--