From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:41907) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SBTYq-0000Q2-54 for qemu-devel@nongnu.org; Sat, 24 Mar 2012 12:11:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SBTYo-0006Gm-70 for qemu-devel@nongnu.org; Sat, 24 Mar 2012 12:11:23 -0400 Received: from mail-wi0-f181.google.com ([209.85.212.181]:41765) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SBTYn-0006Gd-UQ for qemu-devel@nongnu.org; Sat, 24 Mar 2012 12:11:22 -0400 Received: by wibhr17 with SMTP id hr17so2818733wib.10 for ; Sat, 24 Mar 2012 09:11:19 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: <20120323085010.26047.31273.malonedeb@chaenomeles.canonical.com> <1332533128-24331-1-git-send-email-sw@weilnetz.de> Date: Sat, 24 Mar 2012 18:11:19 +0200 Message-ID: From: Emre Ersin Content-Type: multipart/alternative; boundary=f46d043be1d03692b404bbff6432 Subject: Re: [Qemu-devel] [PATCH] Makefile: Set default locale C List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: Stefan Weil , qemu-devel@nongnu.org --f46d043be1d03692b404bbff6432 Content-Type: text/plain; charset=UTF-8 It has to be set before configure. Because configure script creates wrong .h file. On Sat, Mar 24, 2012 at 2:44 PM, Peter Maydell wrote: > On 23 March 2012 20:05, Stefan Weil wrote: > > +# Set default locale for commands like tr and others. > > +LANG=C > > +LC_ALL=C > > +LC_CTYPE=C > > You don't export these, which leads to an obscure corner case: > if the user has no LANG variable set in their environment when > they run make then we will set LANG=C in the top level makefile > but it will not be set in a sub-makefile. Since the default > locale is the same as the C locale this doesn't make any > practical difference, but it's a little odd. > > (Make automatically exports variables to submakes if they had > some value in its environment when it was started, but not if > they were only set in the makefile.) > > Also, do we need to set these in configure too? > > -- PMM > -- Emre Ersin --f46d043be1d03692b404bbff6432 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable It has to be set before configure. Because configure script creates wrong .= h file.

On Sat, Mar 24, 2012 at 2:44 PM,= Peter Maydell <peter.maydell@linaro.org> wrote:
On 23 March 2012 20:05, St= efan Weil <sw@weilnetz.de> wrot= e:
> +# Set default locale for commands like tr and others.
> +LANG=3DC
> +LC_ALL=3DC
> +LC_CTYPE=3DC

You don't export these, which leads to an obscure corner case: if the user has no LANG variable set in their environment when
they run make then we will set LANG=3DC in the top level makefile
but it will not be set in a sub-makefile. Since the default
locale is the same as the C locale this doesn't make any
practical difference, but it's a little odd.

(Make automatically exports variables to submakes if they had
some value in its environment when it was started, but not if
they were only set in the makefile.)

Also, do we need to set these in configure too?

-- PMM



--
Emre Ersin

--f46d043be1d03692b404bbff6432--