Re: BUG: bad notmuch shared library install_name on Mac OS X
[notmuch-archives.git] / a8 / 6147f94d8e72a1af64c961b5224b1e81362b01
1 Return-Path: <chris@chris-wilson.co.uk>\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 04C3E431FBC\r
6         for <notmuch@notmuchmail.org>; Wed, 18 Nov 2009 03:36:40 -0800 (PST)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 Received: from olra.theworths.org ([127.0.0.1])\r
9         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
10         with ESMTP id EK1EJVf3FXp4 for <notmuch@notmuchmail.org>;\r
11         Wed, 18 Nov 2009 03:36:39 -0800 (PST)\r
12 Received: from orsmga101.jf.intel.com (mga06.intel.com [134.134.136.21])\r
13         by olra.theworths.org (Postfix) with ESMTP id 3EC64431FAE\r
14         for <notmuch@notmuchmail.org>; Wed, 18 Nov 2009 03:36:39 -0800 (PST)\r
15 Received: from orsmga001.jf.intel.com ([10.7.209.18])\r
16         by orsmga101.jf.intel.com with ESMTP; 18 Nov 2009 03:22:13 -0800\r
17 X-ExtLoop1: 1\r
18 X-IronPort-AV: E=Sophos;i="4.44,764,1249282800"; d="scan'208";a="570709306"\r
19 Received: from unknown (HELO localhost.localdomain) ([10.255.16.119])\r
20         by orsmga001.jf.intel.com with ESMTP; 18 Nov 2009 03:36:28 -0800\r
21 From: Chris Wilson <chris@chris-wilson.co.uk>\r
22 To: notmuch@notmuchmail.org\r
23 Date: Wed, 18 Nov 2009 11:34:54 +0000\r
24 Message-Id: <1258544095-16616-1-git-send-email-chris@chris-wilson.co.uk>\r
25 X-Mailer: git-send-email 1.6.5.2\r
26 Subject: [notmuch] [PATCH 1/2] Makefile: evaluate pkg-config once\r
27 X-BeenThere: notmuch@notmuchmail.org\r
28 X-Mailman-Version: 2.1.12\r
29 Precedence: list\r
30 List-Id: "Use and development of the notmuch mail system."\r
31         <notmuch.notmuchmail.org>\r
32 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
33         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
34 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
35 List-Post: <mailto:notmuch@notmuchmail.org>\r
36 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
37 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
38         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
39 X-List-Received-Date: Wed, 18 Nov 2009 11:36:40 -0000\r
40 \r
41 Currently the same `pkg-config ...` is executed for every target, so\r
42 just store the results in a variable.\r
43 ---\r
44  Makefile |    9 +++++----\r
45  1 files changed, 5 insertions(+), 4 deletions(-)\r
46 \r
47 diff --git a/Makefile b/Makefile\r
48 index 96aaa73..023b2ec 100644\r
49 --- a/Makefile\r
50 +++ b/Makefile\r
51 @@ -4,15 +4,16 @@ CFLAGS=-O2\r
52  \r
53  # Additional flags that we will append to whatever the user set.\r
54  # These aren't intended for the user to manipulate.\r
55 -extra_cflags = `pkg-config --cflags glib-2.0 gmime-2.4 talloc`\r
56 -extra_cxxflags = `xapian-config --cxxflags`\r
57 +extra_cflags := $(shell pkg-config --cflags glib-2.0 gmime-2.4 talloc)\r
58 +extra_cxxflags := $(shell xapian-config --cxxflags)\r
59  \r
60  # Now smash together user's values with our extra values\r
61  override CFLAGS += $(WARN_FLAGS) $(extra_cflags)\r
62  override CXXFLAGS += $(WARN_FLAGS) $(extra_cflags) $(extra_cxxflags)\r
63  \r
64 -override LDFLAGS += `pkg-config --libs glib-2.0 gmime-2.4 talloc` \\r
65 -                       `xapian-config --libs`\r
66 +override LDFLAGS += \\r
67 +       $(shell pkg-config --libs glib-2.0 gmime-2.4 talloc) \\r
68 +       $(shell xapian-config --libs)\r
69  \r
70  # Include our local Makefile.local first so that its first target is default\r
71  include Makefile.local\r
72 -- \r
73 1.6.5.2\r
74 \r