Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 893944196F4 for ; Wed, 12 May 2010 10:30:08 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -1.9 X-Spam-Level: X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5 tests=[BAYES_00=-1.9] autolearn=ham Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id yZAxAC0AUbuD for ; Wed, 12 May 2010 10:29:58 -0700 (PDT) Received: from dmz-mailsec-scanner-5.mit.edu (DMZ-MAILSEC-SCANNER-5.MIT.EDU [18.7.68.34]) by olra.theworths.org (Postfix) with ESMTP id ECBA44196F0 for ; Wed, 12 May 2010 10:29:57 -0700 (PDT) X-AuditID: 12074422-b7c13ae000003829-05-4beae595aa94 Received: from mailhub-auth-1.mit.edu (MAILHUB-AUTH-1.MIT.EDU [18.9.21.35]) by dmz-mailsec-scanner-5.mit.edu (Symantec Brightmail Gateway) with SMTP id D0.1F.14377.595EAEB4; Wed, 12 May 2010 13:29:57 -0400 (EDT) Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103]) by mailhub-auth-1.mit.edu (8.13.8/8.9.2) with ESMTP id o4CHTvjw021543; Wed, 12 May 2010 13:29:57 -0400 Received: from PHANATIQUE.MIT.EDU (c-71-192-160-118.hsd1.nh.comcast.net [71.192.160.118]) (authenticated bits=0) (User authenticated as nelhage@ATHENA.MIT.EDU) by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id o4CHTtsk001737 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Wed, 12 May 2010 13:29:56 -0400 (EDT) Date: Wed, 12 May 2010 13:29:55 -0400 From: Nelson Elhage To: Jameson Rollins Subject: Re: [PATCH] configure: Respect LDFLAGS from the environment. Message-ID: <20100512172955.GB32152@mit.edu> References: <1273682752-19140-1-git-send-email-nelhage@ksplice.com> <87wrv9caxg.fsf@servo.finestructure.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87wrv9caxg.fsf@servo.finestructure.net> User-Agent: Mutt/1.5.20 (2009-06-14) X-Brightmail-Tracker: AAAAAhQpIcAUKTNi Cc: notmuch@notmuchmail.org X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 May 2010 17:30:08 -0000 Hm. You're probably right that it should be ${LDFLAGS:-} for consistency with the others, but what I wrote is functionally correct: ${LDFLAGS-FOO} means "If LDFLAGS is set at all (even to an empty value), substitute $LDFLAGS; otherwise, substitute FOO". ${LDFLAGS:-FOO} is the same, except in the case where LDFLAGS is set to the empty string, in which case it substitutes FOO. So, for the case where FOO is the empty string, they're identical. However, since I chose ${LDFLAGS-} out of habit, and not particularly intentionally, and the other lines use :-, so it probably makes sense to use that form instead. (Of course, as long as the default is empty and we're not running under 'set -u', we could just remove the line entirely. But I think it's good for the sake of explicitness.) - Nelson (If you're morbidly curious, http://www.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html#tag_02_06_02 defines all the different ${blah} forms you can use in sh) On Wed, May 12, 2010 at 01:00:27PM -0400, Jameson Rollins wrote: > On Wed, 12 May 2010 12:45:52 -0400, Nelson Elhage wrote: > > The configure usage string documents that it respects LDFLAGS, but > > currently it doesn't do anything with the configure-time LDFLAGS > > value. > > --- > > configure | 4 ++++ > > 1 files changed, 4 insertions(+), 0 deletions(-) > > > > diff --git a/configure b/configure > > index c522ad8..90355e8 100755 > > --- a/configure > > +++ b/configure > > @@ -6,6 +6,7 @@ CC=${CC:-gcc} > > CXX=${CXX:-g++} > > CFLAGS=${CFLAGS:--O2} > > CXXFLAGS=${CXXFLAGS:-\$(CFLAGS)} > > +LDFLAGS=${LDFLAGS-} > > Hey, Nelson. I'm not sure exactly what you're trying to do here, but > I'm betting that this is not it. If you're trying to get the LDFLAGS > var from the existing environment, you probably want: > > LDFLAGS=${LDFLAGS:-} > > jamie. > _______________________________________________ > notmuch mailing list > notmuch@notmuchmail.org > http://notmuchmail.org/mailman/listinfo/notmuch