Re: make bug on Solaris when using Sun CC
Robert-Andre Croteau <[email protected]> Thu, 08 Jan 2004 01:02:44 -0500
| Newsgroups | gmane.network.bb4.devel |
|---|---|
| Organization | Quest Software, Inc. |
| Message-ID | <[email protected]> |
Scott Wilson wrote:
>
> Using Big Brother 1.9e with Solaris 9 I just ran into a make bug.
>
> The file src/minimake/genmake tests to see which complier you are using
> with the following lines:
>
> -----
> # IF gcc IS PRESENT, USE IT
> if test -f "/usr/local/bin/gcc"
> then
> CC="gcc"
> else
> XX=`type gcc` 2>/dev/null
> if test "$XX" = ""
> then
> CC="cc"
> else
> CC="gcc"
> fi
> fi
> -----
>
> However, the line:
> XX=`type gcc` 2>/dev/null
>
> does not work as intended. The ` character does not work exactly the same
> in Bourne on Solaris as it does in other operating systems. Standard
> error does not seem to be redirectable. If gcc is not installed on a
> machine, the following lines:
>
> XX=`type gcc`
> XX=`type gcc` 2>/dev/null
> XX=`type gcc 2>/dev/null `
>
> all give the same results which is that XX is "gcc not found", which ends
> up setting CC to "gcc" even though gcc is not installed on the system.
>
> I'd recommend replacing the above code with:
>
> -----
> # IF gcc IS PRESENT, USE IT
> if test -f "/usr/local/bin/gcc"
> then
> CC="gcc"
> else
> XX=`type gcc` 2>/dev/null
> if test "$XX" = "" -o "$XX" = "gcc not found"
> then
> CC="cc"
> else
> CC="gcc"
> fi
> fi
actually
XX=`type gcc` 2>/dev/null
was intended to be
XX=`type gcc 2>/dev/null`
me bad.
BTW, are you sure Sol9 yields "gcc not found" for this statement:
XX=`type gcc 2>/dev/null `
XX should be empty...
thanks for the heads up
--
Robert-Andre Croteau BSD,MOTU
Quest Software, Inc. Big Brother, Product Architect
http://www.quest.com/ http://bb4.com/
+1 (514) 238-9374
Si le bonheur ne s'achete pas alors louez le.
--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=
To unsubscribe from this list send e-mail to mailto:[email protected]
with unsubscribe bbd in the BODY of the message.