Re: message-default-mail-headers not working in notmuch 0.22
[notmuch-archives.git] / 7f / 0acd26974c4ec0eb14b30e31f7eeffc47bdcbb
1 Return-Path: <bremner@tethera.net>\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 A7F98429E2E\r
6         for <notmuch@notmuchmail.org>; Sun, 26 Jun 2011 19:42:43 -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: -2.3\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-2.3 tagged_above=-999 required=5\r
12         tests=[RCVD_IN_DNSWL_MED=-2.3] autolearn=disabled\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 ZSYEhnl-OGf1 for <notmuch@notmuchmail.org>;\r
16         Sun, 26 Jun 2011 19:42:43 -0700 (PDT)\r
17 Received: from tempo.its.unb.ca (tempo.its.unb.ca [131.202.1.21])\r
18         (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))\r
19         (No client certificate requested)\r
20         by olra.theworths.org (Postfix) with ESMTPS id 00ED9431FD0\r
21         for <notmuch@notmuchmail.org>; Sun, 26 Jun 2011 19:42:42 -0700 (PDT)\r
22 Received: from zancas.localnet\r
23         (fctnnbsc30w-142167176081.pppoe-dynamic.High-Speed.nb.bellaliant.net\r
24         [142.167.176.81]) (authenticated bits=0)\r
25         by tempo.its.unb.ca (8.13.8/8.13.8) with ESMTP id p5R2gbCk030272\r
26         (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NO);\r
27         Sun, 26 Jun 2011 23:42:38 -0300\r
28 Received: from bremner by zancas.localnet with local (Exim 4.76)\r
29         (envelope-from <bremner@tethera.net>)\r
30         id 1Qb1mX-0007y0-Dq; Sun, 26 Jun 2011 23:42:37 -0300\r
31 From: david@tethera.net\r
32 To: notmuch@notmuchmail.org\r
33 Subject: [PATCH] libnotmuch: build symbols list without relying on gcc\r
34         -aux-info.\r
35 Date: Sun, 26 Jun 2011 23:42:25 -0300\r
36 Message-Id: <1309142545-30590-1-git-send-email-david@tethera.net>\r
37 X-Mailer: git-send-email 1.7.5.4\r
38 In-Reply-To: <1309136932-21910-1-git-send-email-david@tethera.net>\r
39 References: <1309136932-21910-1-git-send-email-david@tethera.net>\r
40 Cc: David Bremner <bremner@debian.org>\r
41 X-BeenThere: notmuch@notmuchmail.org\r
42 X-Mailman-Version: 2.1.13\r
43 Precedence: list\r
44 List-Id: "Use and development of the notmuch mail system."\r
45         <notmuch.notmuchmail.org>\r
46 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
47         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
48 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
49 List-Post: <mailto:notmuch@notmuchmail.org>\r
50 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
51 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
52         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
53 X-List-Received-Date: Mon, 27 Jun 2011 02:42:43 -0000\r
54 \r
55 From: David Bremner <bremner@debian.org>\r
56 \r
57 Carl reports "gcc -aux-info notmuch.aux lib/notmuch.h" does not\r
58 generate notmuch.aux for him with Debian gcc 4.6.0-8.\r
59 \r
60 Based on a suggestion by Austin Clements, this version uses objdump to\r
61 get the symbols from the object files.\r
62 \r
63 Any symbol that\r
64 \r
65     - is in some object file in $(libnotmuch_modules), and\r
66     - starts with notmuch_\r
67 \r
68 will be exported.\r
69 ---\r
70 \r
71  Here is another way of doing this, probably better unless you are\r
72  very attached to the idea of declaring the API in the header file.\r
73  \r
74 \r
75  lib/Makefile.local |    7 +++----\r
76  1 files changed, 3 insertions(+), 4 deletions(-)\r
77 \r
78 diff --git a/lib/Makefile.local b/lib/Makefile.local\r
79 index a33ba34..38913c6 100644\r
80 --- a/lib/Makefile.local\r
81 +++ b/lib/Makefile.local\r
82 @@ -75,10 +75,9 @@ $(dir)/$(LIBNAME): $(libnotmuch_modules) notmuch.sym\r
83         echo $(libnotmuch_modules)\r
84         $(call quiet,CXX $(CXXFLAGS)) $(libnotmuch_modules) $(FINAL_LIBNOTMUCH_LDFLAGS) $(LIBRARY_LINK_FLAG) -o $@\r
85  \r
86 -notmuch.sym: lib/notmuch.h\r
87 -       gcc -aux-info notmuch.aux $<\r
88 +notmuch.sym: $(libnotmuch_modules)\r
89         printf "{\nglobal:\n" > notmuch.sym\r
90 -       sed  -n 's/.*\(notmuch_[a-z_]*\) (.*/\t\1;/p' notmuch.aux >> notmuch.sym\r
91 +       objdump -t $(libnotmuch_modules)| awk '$$4 == ".text" && $$6 ~ "^notmuch" {print "\t"$$6";"}' >>notmuch.sym\r
92         printf "local: *;\n};\n" >> notmuch.sym\r
93  \r
94  $(dir)/$(SONAME): $(dir)/$(LIBNAME)\r
95 @@ -103,4 +102,4 @@ install-$(dir): $(dir)/$(LIBNAME)\r
96         $(LIBRARY_INSTALL_POST_COMMAND)\r
97  \r
98  SRCS  := $(SRCS) $(libnotmuch_c_srcs) $(libnotmuch_cxx_srcs)\r
99 -CLEAN := $(CLEAN) $(libnotmuch_modules) $(dir)/$(SONAME) $(dir)/$(LINKER_NAME) $(dir)$(LIBNAME) libnotmuch.a notmuch.aux notmuch.sym\r
100 +CLEAN := $(CLEAN) $(libnotmuch_modules) $(dir)/$(SONAME) $(dir)/$(LINKER_NAME) $(dir)$(LIBNAME) libnotmuch.a notmuch.sym\r
101 -- \r
102 1.7.5.4\r
103 \r