Subject: Re: CVS commit: pkgsrc/mk
To: None <tnn@netbsd.org>
From: Roland Illig <rillig@NetBSD.org>
List: tech-pkg
Date: 04/17/2007 21:26:59
Tobias Nygren wrote:
> Module Name:	pkgsrc
> Committed By:	tnn
> Date:		Tue Apr 17 10:48:29 UTC 2007
> 
> Modified Files:
> 	pkgsrc/mk: bsd.prefs.mk
> 
> Log Message:
> Save a fork() by not invoking the 'tr' utility.
> XXX: the OS_VERSION stuff could use a similar cleanup, replacing
> tr A-Z a-z occurences with the make :tl modifier.

At the first sight, it may look as if you were saving a fork(), but the 
opposite is true. Try the following:

OPSYS= ${:!${UNAME} -s; echo . 1>&2!:S/-//g:S/\///g}

which prints a dot whenever it is called. When I run "bmake show-var 
VARNAME=OPSYS" in the pkglint directory, the command is called 66 times.

Roland