> I haven't looked closely at this, but I will note right off that this:
>
> dt> "CC=$$(echo $$(case '$(CC)' in (stage*) echo '$(CC)' | sed -e
>
> is very non-portable. /bin/sh on Solaris (2.5.1 and 2.6 at least)
> can't handle either of these constructs (either $() or () in case match
> items), for example. Since make always uses /bin/sh, installing this
> construct will make gcc unbuildable on Solaris (at least).
I have looked at this even less closely than you; perhaps I have missed
something. If you are constructing the makefile via autoconf, why not
detect a shell that will do such expansions and set SHELL in the output
makefile accordingly? With SHELL=/bin/ksh, the above should work.
Also, just FYI, the default make on Solaris (from the development tools
package, sitting in /usr/ccs/bin) is the same make as the POSIX-complaint
make, so it would pay attention to the SHELL setting:
% ls -lF /usr/*/bin/make
-rwxr-xr-x 1 bin bin 269520 Sep 13 1999 /usr/ccs/bin/make*
-rwxr-xr-x 1 bin bin 269520 Sep 13 1999 /usr/xpg4/bin/make*
% cmp /usr/*/bin/make
Phil