From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:59846) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S8WDS-0006SV-Kn for qemu-devel@nongnu.org; Fri, 16 Mar 2012 08:25:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S8WDJ-0003M0-Ts for qemu-devel@nongnu.org; Fri, 16 Mar 2012 08:25:06 -0400 Received: from mout.web.de ([212.227.15.3]:63751) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S8WDJ-0003Li-Ko for qemu-devel@nongnu.org; Fri, 16 Mar 2012 08:24:57 -0400 Message-ID: <4F633114.50601@web.de> Date: Fri, 16 Mar 2012 13:24:52 +0100 From: =?UTF-8?B?QW5kcmVhcyBGw6RyYmVy?= MIME-Version: 1.0 References: <1087EBB0-5CF0-49F1-971F-EE8ADC5E06DB@nowonline.co.uk> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 1/5] configure to set shell type List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: Lee Essen , qemu-devel@nongnu.org Am 16.03.2012 13:15, schrieb Peter Maydell: > On 16 March 2012 12:02, Lee Essen wrote: >> Adds support to configure for controlling which shell to use, defaults to "sh" as before >> but adds "bash" for Solaris/Illumos builds. Plus ensures that tracetool is called with a >> shell. > > Ugh. If we have bashisms in our shell scripts/configure/makefiles etc we should > fix them, not paper over them. > > If Solaris' /bin/sh isn't a POSIX sh that's a bug in Solaris :-) Nah, Sun had really long support cycles and used to provide a POSIX sh alongside their old sh for compatibility with themselves. ;-) We found that actually documented in their man pages while investigating that in response to my bug report. (Lee, don't forget to search the archives!) > >> -echo " Available backends:" $("$source_path"/scripts/tracetool --list-backends) >> +echo " Available backends:" $($shell "$source_path"/scripts/tracetool --list-backends) > > This shouldn't be necessary -- tracetool has a #!/bin/sh at the top. > If it needs bash then that should be fixed. No, please. I'd be okay with setting shell="bash" in a reasonably limited environment (say, Solaris 11) but not with requiring bash for all platforms. The issue here is really just getting a fully POSIX-conformant shell. And the way I expect this to work is by executing configure and make in such a shell and by not having hardcoded /bin/sh creep in through some shebang line. Andreas >> -sh "$source_path/scripts/tracetool" "--$trace_backend" --check-backend > /dev/null 2> /dev/null >> +$shell "$source_path/scripts/tracetool" "--$trace_backend" --check-backend > /dev/null 2> /dev/null > > ...and we shouldn't need to use either 'sh' or '$shell' here... > > -- PMM