From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ben Key Newsgroups: gmane.emacs.devel Subject: Re: Patch make configure.bat support --cflags and --ldflags options that include quotes Date: Fri, 29 Apr 2011 10:11:47 -0500 Message-ID: References: <83r58l7bwb.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=20cf30364013e2747a04a21018ca X-Trace: dough.gmane.org 1304089939 24927 80.91.229.12 (29 Apr 2011 15:12:19 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 29 Apr 2011 15:12:19 +0000 (UTC) Cc: Emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Apr 29 17:12:15 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QFpMd-00058O-2T for ged-emacs-devel@m.gmane.org; Fri, 29 Apr 2011 17:12:15 +0200 Original-Received: from localhost ([::1]:57236 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QFpMc-0000pv-Eo for ged-emacs-devel@m.gmane.org; Fri, 29 Apr 2011 11:12:14 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:38993) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QFpMZ-0000pe-Fv for Emacs-devel@gnu.org; Fri, 29 Apr 2011 11:12:12 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QFpMY-0004VW-Er for Emacs-devel@gnu.org; Fri, 29 Apr 2011 11:12:11 -0400 Original-Received: from mail-bw0-f41.google.com ([209.85.214.41]:64440) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QFpMX-0004Qv-8N; Fri, 29 Apr 2011 11:12:09 -0400 Original-Received: by bwz17 with SMTP id 17so4017763bwz.0 for ; Fri, 29 Apr 2011 08:12:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type; bh=PA4S5JdiArvUTwdwdhMIeaStJ9MDL81UIt3tazQCtLI=; b=Sh/GT8/Gs60IzL4kljLnKGUPjhtc2Q93nzKf8fUNEYTYJWixygek5/XStoIeUi1wrA 7IonGVsr73O9cxzsVIlGaKpB+1VbzEdwSq0jWLJO9ZGmsC9NfRiFpvMufPGZbpYzeKim ot0Kyi3APELaPUVhcGB0BRtKVPfxOIQC7tVhI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; b=SfHR8MeEF9f0kqUGX2ikLBTVdzPfOJLODuwPty1Y3OfBJim4JX48yFIuY/vLaye90/ BbFFBF3BI+kOaH47hIbuuDOO8yMMihGvskjygMc6rSBHKeJLqMagL5awwRNTTq0v3tzP J71ku8j/xOs8qtzt2raWgQ+1gEuSQDFJ8oe2c= Original-Received: by 10.205.24.9 with SMTP id rc9mr2392023bkb.92.1304089927512; Fri, 29 Apr 2011 08:12:07 -0700 (PDT) Original-Received: by 10.204.126.85 with HTTP; Fri, 29 Apr 2011 08:11:47 -0700 (PDT) In-Reply-To: <83r58l7bwb.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 209.85.214.41 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:138898 Archived-At: --20cf30364013e2747a04a21018ca Content-Type: text/plain; charset=ISO-8859-1 Eli Zaretskii wrote: > Maybe I'm missing something, but where is the fallback, exactly? The code that you refrenced is simply not called in the fallback case, due to the following code :usercflags if "%use_extensions%" == "1" goto ucflagex goto ucflagne The code you referred to is in the ucflagex case, but, if command extensions are not enabled, the ucflagne case is used. In the ucflagne case there are the following lines. set usercflags=%usercflags%%sep1%%1 set fusercflags=%usercflags% The first of these lines sets usercflags without attempting to use the command extensions magic that strips quotes and thus providing support for options in the form of -DFOO=BAR as long as they are enclosed in quotes and the second line sets fusercflags so that it simply contains the value of usercflags The line latter in the file that you referred to, if (%docflags%) == (Y) echo #define USER_CFLAGS " %fusercflags%">>config.tmp , uses only the fusercflags variable which is fine. This is because of the fact that, even if command extensions are not enabled, the fusercflags variable will be set to the appropriate value. The fusercflags variable will have the same value as the usercflags variable if command extensions are not available and will be equal to the usercflags variable with all the quotes escaped by the backslash character if command extensions are available. --20cf30364013e2747a04a21018ca Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Eli Zaretskii wrote:

> = Maybe I'm missing something, but where is the fallback, exactly?
The code that you refrenced is simply not called in the fallback case, due= to the following code

:usercflags
if "%use_extensions%" =3D=3D "1&qu= ot; goto ucflagex
goto ucflagne

The code you ref= erred to is in the ucflagex case, but, if command extensions are not enable= d, the ucflagne case is used.=A0 In the ucflagne case there are the followi= ng lines.

set usercflags=3D%usercflags%%sep1%%1
set fusercflags=3D%user= cflags%

The first of these lines sets usercflags wi= thout attempting to use the command extensions magic that strips quotes and= thus providing support for options in the form of -DFOO=3DBAR as long as t= hey are enclosed in quotes and the second line sets fusercflags so that it = simply contains the value of usercflags

The line
latter in the file that you referred to,
if (%docflags%) =3D=3D (Y)= echo #define USER_CFLAGS " %fusercflags%">>config.tmp
, uses only the fusercflags variable which is fine.=A0 This is becau= se of the fact that, even if command extensions are not enabled, the fuserc= flags variable will be set to the appropriate value.=A0 The
fusercflags variable will have the same va= lue as the usercflags variable if command extensions are not available and = will be equal to the usercflags variable with all t= he quotes escaped by the backslash character if command extensions are available.

--20cf30364013e2747a04a21018ca--