[PATCH 4/4] Update NEWS for user.other_name
[notmuch-archives.git] / a0 / f496c5d37fcbd3b3a6059928f02ce22523fd66
1 Return-Path: <jeff@ocjtech.us>\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 30B90431FBC\r
6         for <notmuch@notmuchmail.org>; Thu, 19 Nov 2009 05:13:12 -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 3S3mZmet+ORs for <notmuch@notmuchmail.org>;\r
11         Thu, 19 Nov 2009 05:13:11 -0800 (PST)\r
12 Received: from mail-yx0-f204.google.com (mail-yx0-f204.google.com\r
13         [209.85.210.204])\r
14         by olra.theworths.org (Postfix) with ESMTP id 364C4431FAE\r
15         for <notmuch@notmuchmail.org>; Thu, 19 Nov 2009 05:13:11 -0800 (PST)\r
16 Received: by yxe42 with SMTP id 42so2273393yxe.22\r
17         for <notmuch@notmuchmail.org>; Thu, 19 Nov 2009 05:13:10 -0800 (PST)\r
18 Received: by 10.150.246.3 with SMTP id t3mr34648ybh.256.1258636389821;\r
19         Thu, 19 Nov 2009 05:13:09 -0800 (PST)\r
20 Received: from lt26923.campus.dmacc.edu ([69.57.47.215])\r
21         by mx.google.com with ESMTPS id 14sm281818gxk.2.2009.11.19.05.13.08\r
22         (version=TLSv1/SSLv3 cipher=RC4-MD5);\r
23         Thu, 19 Nov 2009 05:13:08 -0800 (PST)\r
24 Received: from localhost ([127.0.0.1] helo=localhost.localdomain)\r
25         by lt26923.campus.dmacc.edu with esmtps (TLSv1:AES256-SHA:256)\r
26         (Exim 4.69) (envelope-from <jeff@ocjtech.us>)\r
27         id 1NB6ot-000220-4D; Thu, 19 Nov 2009 07:13:07 -0600\r
28 From: "Jeffrey C. Ollie" <jeff@ocjtech.us>\r
29 To: Not Much Mail <notmuch@notmuchmail.org>\r
30 Date: Thu, 19 Nov 2009 07:12:48 -0600\r
31 Message-Id: <1258636368-7778-1-git-send-email-jeff@ocjtech.us>\r
32 X-Mailer: git-send-email 1.6.5.2\r
33 In-Reply-To: <1258628956-sup-8884@cannonball>\r
34 References: <1258628956-sup-8884@cannonball>\r
35 Subject: [notmuch] [PATCH] notmuch: improve installation of emacs mode\r
36 X-BeenThere: notmuch@notmuchmail.org\r
37 X-Mailman-Version: 2.1.12\r
38 Precedence: list\r
39 List-Id: "Use and development of the notmuch mail system."\r
40         <notmuch.notmuchmail.org>\r
41 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
42         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
43 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
44 List-Post: <mailto:notmuch@notmuchmail.org>\r
45 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
46 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
47         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
48 X-List-Received-Date: Thu, 19 Nov 2009 13:13:12 -0000\r
49 \r
50 1) Add a separate install target to install emacs mode.\r
51 \r
52 2) Don't hardcode the installation directory, instead use emacs'\r
53    pkg-config module.\r
54 \r
55 3) Install a byte compiled version of the emacs mode.\r
56 \r
57 4) Install the emacs mode in emacs' site-start directory so that it\r
58    gets loaded automatically.\r
59 \r
60 Signed-off-by: Jeffrey C. Ollie <jeff@ocjtech.us>\r
61 ---\r
62  Makefile       |    6 ++++++\r
63  Makefile.local |   13 ++++++++++---\r
64  2 files changed, 16 insertions(+), 3 deletions(-)\r
65 \r
66 diff --git a/Makefile b/Makefile\r
67 index 023b2ec..17fa4a2 100644\r
68 --- a/Makefile\r
69 +++ b/Makefile\r
70 @@ -7,6 +7,9 @@ CFLAGS=-O2\r
71  extra_cflags := $(shell pkg-config --cflags glib-2.0 gmime-2.4 talloc)\r
72  extra_cxxflags := $(shell xapian-config --cxxflags)\r
73  \r
74 +emacs_lispdir := $(shell pkg-config emacs --variable sitepkglispdir)\r
75 +emacs_startdir := $(shell pkg-config emacs --variable sitestartdir)\r
76 +\r
77  # Now smash together user's values with our extra values\r
78  override CFLAGS += $(WARN_FLAGS) $(extra_cflags)\r
79  override CXXFLAGS += $(WARN_FLAGS) $(extra_cflags) $(extra_cxxflags)\r
80 @@ -28,6 +31,9 @@ include Makefile.config\r
81  %.o: %.c\r
82         $(CC) -c $(CFLAGS) $< -o $@\r
83  \r
84 +%.elc: %.el\r
85 +       emacs -batch -f batch-byte-compile $<\r
86 +\r
87  .deps/%.d: %.c\r
88         @set -e; rm -f $@; mkdir -p $$(dirname $@) ; \\r
89         $(CC) -M $(CPPFLAGS) $(CFLAGS) $< > $@.$$$$; \\r
90 diff --git a/Makefile.local b/Makefile.local\r
91 index 6bc01a5..e4a27e5 100644\r
92 --- a/Makefile.local\r
93 +++ b/Makefile.local\r
94 @@ -1,4 +1,4 @@\r
95 -all: notmuch notmuch.1.gz\r
96 +all: notmuch notmuch.1.gz notmuch.elc\r
97  \r
98  notmuch_client_srcs =          \\r
99         notmuch.c               \\r
100 @@ -25,15 +25,22 @@ notmuch.1.gz: notmuch.1\r
101  \r
102  install: all notmuch.1.gz\r
103         for d in $(DESTDIR)$(prefix)/bin/ $(DESTDIR)$(prefix)/share/man/man1 \\r
104 -               $(DESTDIR)/$(prefix)/share/emacs/site-lisp/ $(DESTDIR)/etc/bash_completion.d/ ; \\r
105 +               $(DESTDIR)/etc/bash_completion.d/ ; \\r
106         do \\r
107                 install -d $$d ; \\r
108         done ;\r
109         install notmuch $(DESTDIR)$(prefix)/bin/\r
110         install -m0644 notmuch.1.gz $(DESTDIR)$(prefix)/share/man/man1/\r
111 -       install -m0644 notmuch.el $(DESTDIR)$(prefix)/share/emacs/site-lisp/\r
112         install notmuch-completion.bash \\r
113                 $(DESTDIR)/etc/bash_completion.d/notmuch\r
114  \r
115 +install-emacs: install notmuch.elc\r
116 +       for d in $(DESTDIR)/$(emacs_startdir) ; \\r
117 +       do \\r
118 +               install -d $$d ; \\r
119 +       done ;\r
120 +       install -m0644 notmuch.el $(DESTDIR)$(emacs_startdir)\r
121 +       install -m0644 notmuch.elc $(DESTDIR)$(emacs_startdir)\r
122 +\r
123  SRCS  := $(SRCS) $(notmuch_client_srcs)\r
124  CLEAN := $(CLEAN) notmuch $(notmuch_client_modules)\r
125 -- \r
126 1.6.5.2\r
127 \r