Re: [PATCH v4 01/16] add util/search-path.{c, h} to test for executables in $PATH
[notmuch-archives.git] / a8 / 0592a816d41257e8b23611b34e0aa1821ae604
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 7D068431FBC\r
6         for <notmuch@notmuchmail.org>; Thu, 19 Nov 2009 05:19:02 -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 CZxC3AF+ToZh for <notmuch@notmuchmail.org>;\r
11         Thu, 19 Nov 2009 05:18:58 -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 2CC21431FAE\r
14         for <notmuch@notmuchmail.org>; Thu, 19 Nov 2009 05:18:58 -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 1NB6uX-0000LT-CK\r
18         for notmuch@notmuchmail.org; Thu, 19 Nov 2009 13:18:57 +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: <1258636368-7778-1-git-send-email-jeff@ocjtech.us>\r
23 References: <1258628956-sup-8884@cannonball>\r
24         <1258636368-7778-1-git-send-email-jeff@ocjtech.us>\r
25 Date: Thu, 19 Nov 2009 14:18:55 +0100\r
26 Message-Id: <1258636656-sup-8390@cannonball>\r
27 User-Agent: Sup/git\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
32 Precedence: list\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 13:19:02 -0000\r
43 \r
44 Excerpts from Jeffrey C. Ollie's message of Thu Nov 19 14:12:48 +0100 2009:\r
45 > 1) Add a separate install target to install emacs mode.\r
46 \r
47 Thanks\r
48 \r
49 > 2) Don't hardcode the installation directory, instead use emacs'\r
50 >    pkg-config module.\r
51\r
52 > 3) Install a byte compiled version of the emacs mode.\r
53\r
54 > 4) Install the emacs mode in emacs' site-start directory so that it\r
55 >    gets loaded automatically.\r
56\r
57 > Signed-off-by: Jeffrey C. Ollie <jeff@ocjtech.us>\r
58 > ---\r
59 >  Makefile       |    6 ++++++\r
60 >  Makefile.local |   13 ++++++++++---\r
61 >  2 files changed, 16 insertions(+), 3 deletions(-)\r
62\r
63 > diff --git a/Makefile b/Makefile\r
64 > index 023b2ec..17fa4a2 100644\r
65 > --- a/Makefile\r
66 > +++ b/Makefile\r
67 > @@ -7,6 +7,9 @@ CFLAGS=-O2\r
68 >  extra_cflags := $(shell pkg-config --cflags glib-2.0 gmime-2.4 talloc)\r
69 >  extra_cxxflags := $(shell xapian-config --cxxflags)\r
70 >  \r
71 > +emacs_lispdir := $(shell pkg-config emacs --variable sitepkglispdir)\r
72 > +emacs_startdir := $(shell pkg-config emacs --variable sitestartdir)\r
73 > +\r
74 >  # Now smash together user's values with our extra values\r
75 >  override CFLAGS += $(WARN_FLAGS) $(extra_cflags)\r
76 >  override CXXFLAGS += $(WARN_FLAGS) $(extra_cflags) $(extra_cxxflags)\r
77 > @@ -28,6 +31,9 @@ include Makefile.config\r
78 >  %.o: %.c\r
79 >      $(CC) -c $(CFLAGS) $< -o $@\r
80 >  \r
81 > +%.elc: %.el\r
82 > +    emacs -batch -f batch-byte-compile $<\r
83 > +\r
84 \r
85 Looking at this ..\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.elc requires emacs to build\r
99 \r
100 Maybe make emacs && make install-emacs?\r
101 \r
102 >  \r
103 >  notmuch_client_srcs =        \\r
104 >      notmuch.c        \\r
105 > @@ -25,15 +25,22 @@ notmuch.1.gz: notmuch.1\r
106 >  \r
107 >  install: all notmuch.1.gz\r
108 >      for d in $(DESTDIR)$(prefix)/bin/ $(DESTDIR)$(prefix)/share/man/man1 \\r
109 > -        $(DESTDIR)/$(prefix)/share/emacs/site-lisp/\r
110 > $(DESTDIR)/etc/bash_completion.d/ ; \\r
111 > +        $(DESTDIR)/etc/bash_completion.d/ ; \\r
112 >      do \\r
113 >          install -d $$d ; \\r
114 >      done ;\r
115 >      install notmuch $(DESTDIR)$(prefix)/bin/\r
116 >      install -m0644 notmuch.1.gz $(DESTDIR)$(prefix)/share/man/man1/\r
117 > -    install -m0644 notmuch.el $(DESTDIR)$(prefix)/share/emacs/site-lisp/\r
118 >      install notmuch-completion.bash \\r
119 >          $(DESTDIR)/etc/bash_completion.d/notmuch\r
120 >  \r
121 > +install-emacs: install notmuch.elc\r
122 > +    for d in $(DESTDIR)/$(emacs_startdir) ; \\r
123 > +    do \\r
124 > +        install -d $$d ; \\r
125 > +    done ;\r
126 > +    install -m0644 notmuch.el $(DESTDIR)$(emacs_startdir)\r
127 > +    install -m0644 notmuch.elc $(DESTDIR)$(emacs_startdir)\r
128 > +\r
129 >  SRCS  := $(SRCS) $(notmuch_client_srcs)\r
130 >  CLEAN := $(CLEAN) notmuch $(notmuch_client_modules)\r
131 -- \r
132 Exherbo KDE, X.org maintainer\r