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 35B60431FBC
\r
6 for <notmuch@notmuchmail.org>; Wed, 18 Nov 2009 22:19:10 -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 Iskz+3gEbkxO for <notmuch@notmuchmail.org>;
\r
11 Wed, 18 Nov 2009 22:19:09 -0800 (PST)
\r
12 Received: from mail-yx0-f204.google.com (mail-yx0-f204.google.com
\r
14 by olra.theworths.org (Postfix) with ESMTP id 4228F431FAE
\r
15 for <notmuch@notmuchmail.org>; Wed, 18 Nov 2009 22:19:09 -0800 (PST)
\r
16 Received: by yxe42 with SMTP id 42so2053491yxe.22
\r
17 for <notmuch@notmuchmail.org>; Wed, 18 Nov 2009 22:19:09 -0800 (PST)
\r
18 Received: by 10.150.112.17 with SMTP id k17mr4058039ybc.257.1258611545687;
\r
19 Wed, 18 Nov 2009 22:19:05 -0800 (PST)
\r
20 Received: from lt26923.campus.dmacc.edu ([69.57.47.215])
\r
21 by mx.google.com with ESMTPS id 16sm149669gxk.15.2009.11.18.22.19.04
\r
22 (version=TLSv1/SSLv3 cipher=RC4-MD5);
\r
23 Wed, 18 Nov 2009 22:19:05 -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 1NB0MB-0005Os-9Y; Thu, 19 Nov 2009 00:19:03 -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 00:18:50 -0600
\r
31 Message-Id: <1258611530-20719-1-git-send-email-jeff@ocjtech.us>
\r
32 X-Mailer: git-send-email 1.6.5.2
\r
33 Subject: [notmuch] [PATCH] notmuch: improve installation of emacs mode
\r
34 X-BeenThere: notmuch@notmuchmail.org
\r
35 X-Mailman-Version: 2.1.12
\r
37 List-Id: "Use and development of the notmuch mail system."
\r
38 <notmuch.notmuchmail.org>
\r
39 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
40 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
41 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
42 List-Post: <mailto:notmuch@notmuchmail.org>
\r
43 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
44 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
45 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
46 X-List-Received-Date: Thu, 19 Nov 2009 06:19:10 -0000
\r
48 1) Don't hardcode the installation directory, instead use emacs'
\r
51 2) Install a byte compiled version of the emacs mode.
\r
53 3) Install the emacs mode in emacs' site-start directory so that it
\r
54 gets loaded automatically.
\r
57 Makefile.local | 9 +++++----
\r
58 2 files changed, 11 insertions(+), 4 deletions(-)
\r
60 diff --git a/Makefile b/Makefile
\r
61 index 023b2ec..17fa4a2 100644
\r
64 @@ -7,6 +7,9 @@ CFLAGS=-O2
\r
65 extra_cflags := $(shell pkg-config --cflags glib-2.0 gmime-2.4 talloc)
\r
66 extra_cxxflags := $(shell xapian-config --cxxflags)
\r
68 +emacs_lispdir := $(shell pkg-config emacs --variable sitepkglispdir)
\r
69 +emacs_startdir := $(shell pkg-config emacs --variable sitestartdir)
\r
71 # Now smash together user's values with our extra values
\r
72 override CFLAGS += $(WARN_FLAGS) $(extra_cflags)
\r
73 override CXXFLAGS += $(WARN_FLAGS) $(extra_cflags) $(extra_cxxflags)
\r
74 @@ -28,6 +31,9 @@ include Makefile.config
\r
76 $(CC) -c $(CFLAGS) $< -o $@
\r
79 + emacs -batch -f batch-byte-compile $<
\r
82 @set -e; rm -f $@; mkdir -p $$(dirname $@) ; \
\r
83 $(CC) -M $(CPPFLAGS) $(CFLAGS) $< > $@.$$$$; \
\r
84 diff --git a/Makefile.local b/Makefile.local
\r
85 index 27e42ba..8aac201 100644
\r
86 --- a/Makefile.local
\r
87 +++ b/Makefile.local
\r
89 -all: notmuch notmuch.1.gz
\r
90 +all: notmuch notmuch.1.gz notmuch.elc
\r
92 notmuch_client_srcs = \
\r
94 @@ -23,15 +23,16 @@ notmuch: $(notmuch_client_modules) lib/notmuch.a
\r
95 notmuch.1.gz: notmuch.1
\r
96 gzip --stdout notmuch.1 > notmuch.1.gz
\r
98 -install: all notmuch.1.gz
\r
99 +install: all notmuch.1.gz notmuch.elc
\r
100 for d in $(DESTDIR)$(prefix)/bin/ $(DESTDIR)$(prefix)/share/man/man1 \
\r
101 - $(DESTDIR)/etc/bash_completion.d/ ; \
\r
102 + $(DESTDIR)/etc/bash_completion.d/ $(DESTDIR)$(emacs_startdir) ; \
\r
106 install notmuch $(DESTDIR)$(prefix)/bin/
\r
107 install -m0644 notmuch.1.gz $(DESTDIR)$(prefix)/share/man/man1/
\r
108 - install -m0644 notmuch.el $(DESTDIR)$(prefix)/share/emacs/site-lisp/
\r
109 + install -m0644 notmuch.el $(DESTDIR)$(emacs_startdir)
\r
110 + install -m0644 notmuch.elc $(DESTDIR)$(emacs_startdir)
\r
111 install notmuch-completion.bash \
\r
112 $(DESTDIR)/etc/bash_completion.d/notmuch
\r