]> git.notmuchmail.org Git - notmuch/blob - emacs/Makefile.local
f759c0dc3f5daa7bbe3ddf1eeb26a8e58c20384f
[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
11 emacs_bytecode := $(subst .el,.elc,$(emacs_sources))
12
13 %.elc: %.el
14         $(call quiet,EMACS) --directory emacs -batch -f batch-byte-compile $<
15
16 ifeq ($(HAVE_EMACS),1)
17 all: $(emacs_bytecode)
18 endif
19
20 install: install-emacs
21
22 .PHONY: install-emacs
23 install-emacs:
24         mkdir -p $(DESTDIR)$(emacslispdir)
25         install -m0644 $(emacs_sources) $(DESTDIR)$(emacslispdir)
26 ifeq ($(HAVE_EMACS),1)
27         install -m0644 $(emacs_bytecode) $(DESTDIR)$(emacslispdir)
28 endif
29
30 CLEAN := $(CLEAN) $(emacs_bytecode)