]> git.notmuchmail.org Git - notmuch/blob - emacs/Makefile.local
e5013b360bb4f03b8afc53bc7512fb9565d9e246
[notmuch] / emacs / Makefile.local
1 # -*- makefile -*-
2
3 dir := emacs
4 emacs_sources := \
5         $(dir)/notmuch-lib.el \
6         $(dir)/notmuch.el \
7         $(dir)/notmuch-query.el \
8         $(dir)/notmuch-show.el \
9         $(dir)/notmuch-wash.el \
10         $(dir)/notmuch-hello.el \
11         $(dir)/notmuch-mua.el
12
13 emacs_images := \
14         $(dir)/notmuch-logo.png
15
16 emacs_bytecode := $(subst .el,.elc,$(emacs_sources))
17
18 %.elc: %.el
19         $(call quiet,EMACS) --directory emacs -batch -f batch-byte-compile $<
20
21 ifeq ($(HAVE_EMACS),1)
22 all: $(emacs_bytecode)
23 endif
24
25 install: install-emacs
26
27 .PHONY: install-emacs
28 install-emacs:
29         mkdir -p $(DESTDIR)$(emacslispdir)
30         install -m0644 $(emacs_sources) $(DESTDIR)$(emacslispdir)
31 ifeq ($(HAVE_EMACS),1)
32         install -m0644 $(emacs_bytecode) $(DESTDIR)$(emacslispdir)
33 endif
34         install -m0644 $(emacs_images) $(DESTDIR)$(emacslispdir)
35
36 CLEAN := $(CLEAN) $(emacs_bytecode)