Re: [PATCH 0/5] Notmuch Pick (WIP or contrib)
[notmuch-archives.git] / 86 / a1859329e6ed33cff1bb6170bfb1aa7369e658
1 Return-Path: <nelhage@mit.edu>\r
2 X-Original-To: notmuch@notmuchmail.org\r
3 Delivered-To: notmuch@notmuchmail.org\r
4 Received: from localhost (localhost [127.0.0.1])\r
5         by olra.theworths.org (Postfix) with ESMTP id 893944196F4\r
6         for <notmuch@notmuchmail.org>; Wed, 12 May 2010 10:30:08 -0700 (PDT)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: -1.9\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5\r
12         tests=[BAYES_00=-1.9] autolearn=ham\r
13 Received: from olra.theworths.org ([127.0.0.1])\r
14         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
15         with ESMTP id yZAxAC0AUbuD for <notmuch@notmuchmail.org>;\r
16         Wed, 12 May 2010 10:29:58 -0700 (PDT)\r
17 Received: from dmz-mailsec-scanner-5.mit.edu (DMZ-MAILSEC-SCANNER-5.MIT.EDU\r
18         [18.7.68.34])\r
19         by olra.theworths.org (Postfix) with ESMTP id ECBA44196F0\r
20         for <notmuch@notmuchmail.org>; Wed, 12 May 2010 10:29:57 -0700 (PDT)\r
21 X-AuditID: 12074422-b7c13ae000003829-05-4beae595aa94\r
22 Received: from mailhub-auth-1.mit.edu (MAILHUB-AUTH-1.MIT.EDU [18.9.21.35])\r
23         by dmz-mailsec-scanner-5.mit.edu (Symantec Brightmail Gateway) with\r
24         SMTP id D0.1F.14377.595EAEB4; Wed, 12 May 2010 13:29:57 -0400 (EDT)\r
25 Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103])\r
26         by mailhub-auth-1.mit.edu (8.13.8/8.9.2) with ESMTP id o4CHTvjw021543; \r
27         Wed, 12 May 2010 13:29:57 -0400\r
28 Received: from PHANATIQUE.MIT.EDU (c-71-192-160-118.hsd1.nh.comcast.net\r
29         [71.192.160.118]) (authenticated bits=0)\r
30         (User authenticated as nelhage@ATHENA.MIT.EDU)\r
31         by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id o4CHTtsk001737\r
32         (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT);\r
33         Wed, 12 May 2010 13:29:56 -0400 (EDT)\r
34 Date: Wed, 12 May 2010 13:29:55 -0400\r
35 From: Nelson Elhage <nelhage@MIT.EDU>\r
36 To: Jameson Rollins <jrollins@finestructure.net>\r
37 Subject: Re: [PATCH] configure: Respect LDFLAGS from the environment.\r
38 Message-ID: <20100512172955.GB32152@mit.edu>\r
39 References: <1273682752-19140-1-git-send-email-nelhage@ksplice.com>\r
40         <87wrv9caxg.fsf@servo.finestructure.net>\r
41 MIME-Version: 1.0\r
42 Content-Type: text/plain; charset=us-ascii\r
43 Content-Disposition: inline\r
44 In-Reply-To: <87wrv9caxg.fsf@servo.finestructure.net>\r
45 User-Agent: Mutt/1.5.20 (2009-06-14)\r
46 X-Brightmail-Tracker: AAAAAhQpIcAUKTNi\r
47 Cc: notmuch@notmuchmail.org\r
48 X-BeenThere: notmuch@notmuchmail.org\r
49 X-Mailman-Version: 2.1.13\r
50 Precedence: list\r
51 List-Id: "Use and development of the notmuch mail system."\r
52         <notmuch.notmuchmail.org>\r
53 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
54         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
55 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
56 List-Post: <mailto:notmuch@notmuchmail.org>\r
57 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
58 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
59         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
60 X-List-Received-Date: Wed, 12 May 2010 17:30:08 -0000\r
61 \r
62 Hm. You're probably right that it should be ${LDFLAGS:-} for\r
63 consistency with the others, but what I wrote is functionally correct:\r
64 \r
65 ${LDFLAGS-FOO} means "If LDFLAGS is set at all (even to an empty\r
66 value), substitute $LDFLAGS; otherwise, substitute FOO".\r
67 \r
68 ${LDFLAGS:-FOO} is the same, except in the case where LDFLAGS is set\r
69 to the empty string, in which case it substitutes FOO.\r
70 \r
71 So, for the case where FOO is the empty string, they're\r
72 identical. However, since I chose ${LDFLAGS-} out of habit, and not\r
73 particularly intentionally, and the other lines use :-, so it probably\r
74 makes sense to use that form instead.\r
75 \r
76 (Of course, as long as the default is empty and we're not running\r
77 under 'set -u', we could just remove the line entirely. But I think\r
78 it's good for the sake of explicitness.)\r
79 \r
80 - Nelson\r
81 \r
82 (If you're morbidly curious,\r
83 http://www.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html#tag_02_06_02\r
84 defines all the different ${blah} forms you can use in sh)\r
85 \r
86 On Wed, May 12, 2010 at 01:00:27PM -0400, Jameson Rollins wrote:\r
87 > On Wed, 12 May 2010 12:45:52 -0400, Nelson Elhage <nelhage@ksplice.com> wrote:\r
88 > > The configure usage string documents that it respects LDFLAGS, but\r
89 > > currently it doesn't do anything with the configure-time LDFLAGS\r
90 > > value.\r
91 > > ---\r
92 > >  configure |    4 ++++\r
93 > >  1 files changed, 4 insertions(+), 0 deletions(-)\r
94 > > \r
95 > > diff --git a/configure b/configure\r
96 > > index c522ad8..90355e8 100755\r
97 > > --- a/configure\r
98 > > +++ b/configure\r
99 > > @@ -6,6 +6,7 @@ CC=${CC:-gcc}\r
100 > >  CXX=${CXX:-g++}\r
101 > >  CFLAGS=${CFLAGS:--O2}\r
102 > >  CXXFLAGS=${CXXFLAGS:-\$(CFLAGS)}\r
103 > > +LDFLAGS=${LDFLAGS-}\r
104\r
105 > Hey, Nelson.  I'm not sure exactly what you're trying to do here, but\r
106 > I'm betting that this is not it.  If you're trying to get the LDFLAGS\r
107 > var from the existing environment, you probably want:\r
108\r
109 > LDFLAGS=${LDFLAGS:-}\r
110\r
111 > jamie.\r
112 \r
113 \r
114 \r
115 > _______________________________________________\r
116 > notmuch mailing list\r
117 > notmuch@notmuchmail.org\r
118 > http://notmuchmail.org/mailman/listinfo/notmuch\r
119 \r