]> git.notmuchmail.org Git - notmuch/blob - emacs/Makefile.local
emacs: tree: remove binding for pressing button in message pane
[notmuch] / emacs / Makefile.local
1 # -*- makefile -*-
2
3 dir := emacs
4 emacs_sources := \
5         $(dir)/notmuch-lib.el \
6         $(dir)/notmuch-parser.el \
7         $(dir)/notmuch.el \
8         $(dir)/notmuch-query.el \
9         $(dir)/notmuch-show.el \
10         $(dir)/notmuch-tree.el \
11         $(dir)/notmuch-wash.el \
12         $(dir)/notmuch-hello.el \
13         $(dir)/notmuch-mua.el \
14         $(dir)/notmuch-address.el \
15         $(dir)/notmuch-maildir-fcc.el \
16         $(dir)/notmuch-message.el \
17         $(dir)/notmuch-crypto.el \
18         $(dir)/notmuch-tag.el \
19         $(dir)/coolj.el \
20         $(dir)/notmuch-print.el \
21         $(dir)/notmuch-version.el \
22         $(dir)/notmuch-jump.el \
23         $(dir)/notmuch-company.el
24
25 $(dir)/notmuch-version.el: $(dir)/Makefile.local version.stamp
26 $(dir)/notmuch-version.el: $(srcdir)/$(dir)/notmuch-version.el.tmpl
27         @sed -e 's/%AG%/Generated file (from $(<F)) -- do not edit!/' \
28              -e 's/%VERSION%/"$(VERSION)"/' $< > $@
29
30
31 emacs_images := \
32         $(srcdir)/$(dir)/notmuch-logo.png
33
34 emacs_bytecode = $(emacs_sources:.el=.elc)
35
36 # Because of defmacro's and defsubst's, we have to account for load
37 # dependencies between Elisp files when byte compiling.  Otherwise,
38 # the byte compiler may load an old .elc file when processing a
39 # "require" or we may fail to rebuild a .elc that depended on a macro
40 # from an updated file.
41 ifeq ($(HAVE_EMACS),1)
42 $(dir)/.eldeps: $(dir)/Makefile.local $(dir)/make-deps.el $(emacs_sources)
43         $(call quiet,EMACS) --directory emacs -batch -l make-deps.el \
44                 -f batch-make-deps $(emacs_sources) > $@.tmp && \
45                 mv $@.tmp $@
46 # We could include .eldeps directly, but that would cause a make
47 # restart whenever any .el file was modified, even if dependencies
48 # didn't change, because the mtime of .eldeps will change.  Instead,
49 # we include a second file, .eldeps.x, which we ensure always has the
50 # same content as .eldeps, but its mtime only changes when dependency
51 # information changes, in which case a make restart is necessary
52 # anyway.
53 $(dir)/.eldeps.x: $(dir)/.eldeps
54         @cmp -s $^ $@ || cp $^ $@
55 -include $(dir)/.eldeps.x
56
57 # Add the one dependency make-deps.el does not have visibility to.
58 $(dir)/notmuch-lib.elc: $(dir)/notmuch-version.elc
59
60 endif
61 CLEAN+=$(dir)/.eldeps $(dir)/.eldeps.tmp $(dir)/.eldeps.x
62
63 ifeq ($(HAVE_EMACS),1)
64 %.elc: %.el $(global_deps)
65         $(call quiet,EMACS) --directory emacs -batch -f batch-byte-compile $<
66 endif
67
68 ifeq ($(WITH_EMACS),1)
69 ifeq ($(HAVE_EMACS),1)
70 all: $(emacs_bytecode)
71 install-emacs: $(emacs_bytecode)
72 endif
73
74 install: install-emacs
75 endif
76
77 .PHONY: install-emacs
78 install-emacs: $(emacs_sources) $(emacs_images)
79         mkdir -p "$(DESTDIR)$(emacslispdir)"
80         install -m0644 $(emacs_sources) "$(DESTDIR)$(emacslispdir)"
81 ifeq ($(HAVE_EMACS),1)
82         install -m0644 $(emacs_bytecode) "$(DESTDIR)$(emacslispdir)"
83 endif
84         mkdir -p "$(DESTDIR)$(emacsetcdir)"
85         install -m0644 $(emacs_images) "$(DESTDIR)$(emacsetcdir)"
86
87 CLEAN := $(CLEAN) $(emacs_bytecode) $(dir)/notmuch-version.el