1 Return-Path: <too@guru-group.fi>
\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 E01BE431FD7
\r
6 for <notmuch@notmuchmail.org>; Tue, 27 Aug 2013 10:43:19 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]
\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 6y-gDlsS66Oz for <notmuch@notmuchmail.org>;
\r
16 Tue, 27 Aug 2013 10:43:13 -0700 (PDT)
\r
17 Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34])
\r
18 by olra.theworths.org (Postfix) with ESMTP id 93972431FD6
\r
19 for <notmuch@notmuchmail.org>; Tue, 27 Aug 2013 10:43:13 -0700 (PDT)
\r
20 Received: by guru.guru-group.fi (Postfix, from userid 501)
\r
21 id C67B31000F4; Tue, 27 Aug 2013 20:43:03 +0300 (EEST)
\r
22 From: Tomi Ollila <tomi.ollila@iki.fi>
\r
23 To: notmuch@notmuchmail.org
\r
24 Subject: [PATCH 1/1] emacs: Makefile.local: HAVE_EMACS usage fixes
\r
25 Date: Tue, 27 Aug 2013 20:43:01 +0300
\r
26 Message-Id: <1377625381-23440-1-git-send-email-tomi.ollila@iki.fi>
\r
27 X-Mailer: git-send-email 1.8.0
\r
29 Content-Type: text/plain; charset=UTF-8
\r
30 Content-Transfer-Encoding: 8bit
\r
31 Cc: tomi.ollila@iki.fi
\r
32 X-BeenThere: notmuch@notmuchmail.org
\r
33 X-Mailman-Version: 2.1.13
\r
35 List-Id: "Use and development of the notmuch mail system."
\r
36 <notmuch.notmuchmail.org>
\r
37 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
38 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
39 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
40 List-Post: <mailto:notmuch@notmuchmail.org>
\r
41 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
42 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
43 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
44 X-List-Received-Date: Tue, 27 Aug 2013 17:43:20 -0000
\r
46 If we don't have emacs, disable targets that used EMACS while doing
\r
47 the recipes of that target.
\r
49 If we do have emacs, make install-emacs depend on *.elc files,
\r
50 as making the target will attempt to install those.
\r
53 I tested this first by running tests normally.
\r
54 Next with ./configure --without-emacs (after make distclean).
\r
57 diff --git a/configure b/configure
\r
58 index 6166917..3640b47 100755
\r
61 @@ -363,3 +363,3 @@ fi
\r
62 printf "Checking if emacs is available... "
\r
63 -if emacs --quick --batch > /dev/null 2>&1; then
\r
64 +if eemacs --quick --batch > /dev/null 2>&1; then
\r
66 @@ -658,3 +658,3 @@ CXX = ${CXX}
\r
67 # Command to execute emacs from Makefiles
\r
68 -EMACS = emacs --quick
\r
69 +EMACS = eemacs --quick
\r
71 to hide emacs (make distclean; ./configure; make)
\r
73 All of these worked as expected.
\r
76 Tested the latest with current master (i.e without this patch):
\r
79 Use "make V=1" to see the verbose compile lines.
\r
81 /bin/sh: eemacs: command not found
\r
82 make: Nothing to be done for `all'.
\r
84 (although it seems to work, it complains...)
\r
86 Finally, after applying this patch (and restoring configure),
\r
87 ./configure && make install-emacs DESTDIR=$HOME/DDIR worked fine
\r
89 (without this patch the above gives:
\r
90 install: cannot stat ‘emacs/notmuch-lib.elc’: No such file or directory
\r
91 install: cannot stat ‘emacs/notmuch-parser.elc’: No such file or directory
\r
95 emacs/Makefile.local | 5 +++++
\r
96 1 file changed, 5 insertions(+)
\r
98 diff --git a/emacs/Makefile.local b/emacs/Makefile.local
\r
99 index a910aff..a7e967e 100644
\r
100 --- a/emacs/Makefile.local
\r
101 +++ b/emacs/Makefile.local
\r
102 @@ -28,19 +28,24 @@ emacs_bytecode = $(emacs_sources:.el=.elc)
\r
103 # the byte compiler may load an old .elc file when processing a
\r
104 # "require" or we may fail to rebuild a .elc that depended on a macro
\r
105 # from an updated file.
\r
106 +ifeq ($(HAVE_EMACS),1)
\r
107 $(dir)/.eldeps: $(dir)/Makefile.local $(dir)/make-deps.el $(emacs_sources)
\r
108 $(call quiet,EMACS) --directory emacs -batch -l make-deps.el \
\r
109 -f batch-make-deps $(emacs_sources) > $@.tmp && \
\r
110 (cmp -s $@.tmp $@ || mv $@.tmp $@)
\r
111 -include $(dir)/.eldeps
\r
113 CLEAN+=$(dir)/.eldeps $(dir)/.eldeps.tmp
\r
115 +ifeq ($(HAVE_EMACS),1)
\r
116 %.elc: %.el $(global_deps)
\r
117 $(call quiet,EMACS) --directory emacs -batch -f batch-byte-compile $<
\r
120 ifeq ($(WITH_EMACS),1)
\r
121 ifeq ($(HAVE_EMACS),1)
\r
122 all: $(emacs_bytecode)
\r
123 +install-emacs: $(emacs_bytecode)
\r
126 install: install-emacs
\r