On Fri, 2007-09-07 at 08:16 +0200, John Hay wrote:
> Hi,
> 
> Would it be ok to try and get rid of bashisms? Not all unix machines

IMHO of course. The only reason I used "bash" with all features is that
I didn't
found an easy way to test with a true "posix shell" (does any know how
to make
"bash" POSIX-pure? The last time I tried, it accepted also non-POSIX
things).
So I didn't even pretend to do it:-)

> have bash installed. Here is my try at it. It was tested on FreeBSD
> only, but I have tried to stay within the posix specs, so it should
> work everywhere... I think. :-)

If not someone will or should speak up (and send a patch;-).

> --- Makefile.inc.orig	2007-08-02 14:31:38.000000000 +0200
> +++ Makefile.inc	2007-08-15 11:49:51.000000000 +0200
> @@ -1,5 +1,5 @@
>  # programs
> -CCACHE ?=       $(shell bash -c "type -path ccache")
> +CCACHE ?=       $(shell sh -c "which ccache")
+CCACHE ?=       $(shell which ccache)
should be enough (and saves a fork(2) and exec(2)). Or is "which" a
sh-builtin
(like type in the "bash")?

	Bernd
-- 
Firmix Software GmbH                   http://www.firmix.at/
mobil: +43 664 4416156                 fax: +43 1 7890849-55
          Embedded Linux Development and Services




