1 Return-Path: <ingmar@exherbo.org>
\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 95450431FBC
\r
6 for <notmuch@notmuchmail.org>; Thu, 19 Nov 2009 11:32:33 -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 R5Zh77vdZtx5 for <notmuch@notmuchmail.org>;
\r
11 Thu, 19 Nov 2009 11:32:33 -0800 (PST)
\r
12 Received: from bach.exherbo.org (bach.exherbo.org [78.47.197.147])
\r
13 by olra.theworths.org (Postfix) with ESMTP id AEC14431FAE
\r
14 for <notmuch@notmuchmail.org>; Thu, 19 Nov 2009 11:32:32 -0800 (PST)
\r
15 Received: from [83.101.72.69] (helo=localhost)
\r
16 by bach.exherbo.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.69)
\r
17 (envelope-from <ingmar@exherbo.org>) id 1NBCjz-0001RW-H8
\r
18 for notmuch@notmuchmail.org; Thu, 19 Nov 2009 19:32:28 +0000
\r
19 Content-Type: text/plain; charset=utf8
\r
20 From: Ingmar Vanhassel <ingmar@exherbo.org>
\r
21 To: notmuch <notmuch@notmuchmail.org>
\r
22 In-reply-to: <1258640822-4146-1-git-send-email-jeff@ocjtech.us>
\r
23 References: <1258636656-sup-8390@cannonball>
\r
24 <1258640822-4146-1-git-send-email-jeff@ocjtech.us>
\r
25 Date: Thu, 19 Nov 2009 20:32:22 +0100
\r
26 Message-Id: <1258648185-sup-3691@cannonball>
\r
28 Content-Transfer-Encoding: 8bit
\r
29 Subject: Re: [notmuch] [PATCH] notmuch: improve installation of emacs mode
\r
30 X-BeenThere: notmuch@notmuchmail.org
\r
31 X-Mailman-Version: 2.1.12
\r
33 List-Id: "Use and development of the notmuch mail system."
\r
34 <notmuch.notmuchmail.org>
\r
35 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
36 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
37 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
38 List-Post: <mailto:notmuch@notmuchmail.org>
\r
39 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
40 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
41 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
42 X-List-Received-Date: Thu, 19 Nov 2009 19:32:33 -0000
\r
44 Excerpts from Jeffrey C. Ollie's message of Thu Nov 19 15:27:02 +0100 2009:
\r
45 > 1) Add a separate targets to build and install emacs mode.
\r
47 > 2) Don't hardcode the installation directory, instead use emacs'
\r
48 > pkg-config module.
\r
50 > 3) Install a byte compiled version of the emacs mode.
\r
52 > 4) Install the emacs mode in emacs' site-start directory so that it
\r
53 > gets loaded automatically.
\r
55 > 5) Ignore byte-compiled emacs files.
\r
57 > Signed-off-by: Jeffrey C. Ollie <jeff@ocjtech.us>
\r
59 Reviewed-by: Ingmar Vanhassel <ingmar@exherbo.org>
\r
65 > Makefile | 6 ++++++
\r
66 > Makefile.local | 15 ++++++++++++---
\r
67 > 3 files changed, 19 insertions(+), 4 deletions(-)
\r
69 > diff --git a/.gitignore b/.gitignore
\r
70 > index 8417d60..7d3c543 100644
\r
73 > @@ -5,4 +5,4 @@ notmuch.1.gz
\r
79 > diff --git a/Makefile b/Makefile
\r
80 > index 023b2ec..17fa4a2 100644
\r
83 > @@ -7,6 +7,9 @@ CFLAGS=-O2
\r
84 > extra_cflags := $(shell pkg-config --cflags glib-2.0 gmime-2.4 talloc)
\r
85 > extra_cxxflags := $(shell xapian-config --cxxflags)
\r
87 > +emacs_lispdir := $(shell pkg-config emacs --variable sitepkglispdir)
\r
88 > +emacs_startdir := $(shell pkg-config emacs --variable sitestartdir)
\r
90 > # Now smash together user's values with our extra values
\r
91 > override CFLAGS += $(WARN_FLAGS) $(extra_cflags)
\r
92 > override CXXFLAGS += $(WARN_FLAGS) $(extra_cflags) $(extra_cxxflags)
\r
93 > @@ -28,6 +31,9 @@ include Makefile.config
\r
95 > $(CC) -c $(CFLAGS) $< -o $@
\r
98 > + emacs -batch -f batch-byte-compile $<
\r
101 > @set -e; rm -f $@; mkdir -p $$(dirname $@) ; \
\r
102 > $(CC) -M $(CPPFLAGS) $(CFLAGS) $< > $@.$$$$; \
\r
103 > diff --git a/Makefile.local b/Makefile.local
\r
104 > index 6bc01a5..2bb4521 100644
\r
105 > --- a/Makefile.local
\r
106 > +++ b/Makefile.local
\r
108 > all: notmuch notmuch.1.gz
\r
110 > +emacs: notmuch.elc
\r
112 > notmuch_client_srcs = \
\r
114 > notmuch-config.c \
\r
115 > @@ -25,15 +27,22 @@ notmuch.1.gz: notmuch.1
\r
117 > install: all notmuch.1.gz
\r
118 > for d in $(DESTDIR)$(prefix)/bin/ $(DESTDIR)$(prefix)/share/man/man1 \
\r
119 > - $(DESTDIR)/$(prefix)/share/emacs/site-lisp/
\r
120 > $(DESTDIR)/etc/bash_completion.d/ ; \
\r
121 > + $(DESTDIR)/etc/bash_completion.d/ ; \
\r
123 > install -d $$d ; \
\r
125 > install notmuch $(DESTDIR)$(prefix)/bin/
\r
126 > install -m0644 notmuch.1.gz $(DESTDIR)$(prefix)/share/man/man1/
\r
127 > - install -m0644 notmuch.el $(DESTDIR)$(prefix)/share/emacs/site-lisp/
\r
128 > install notmuch-completion.bash \
\r
129 > $(DESTDIR)/etc/bash_completion.d/notmuch
\r
131 > +install-emacs: install emacs
\r
132 > + for d in $(DESTDIR)/$(emacs_startdir) ; \
\r
134 > + install -d $$d ; \
\r
136 > + install -m0644 notmuch.el $(DESTDIR)$(emacs_startdir)
\r
137 > + install -m0644 notmuch.elc $(DESTDIR)$(emacs_startdir)
\r
139 > SRCS := $(SRCS) $(notmuch_client_srcs)
\r
140 > -CLEAN := $(CLEAN) notmuch $(notmuch_client_modules)
\r
141 > +CLEAN := $(CLEAN) notmuch $(notmuch_client_modules) notmuch.elc
\r
143 Exherbo KDE, X.org maintainer
\r