X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=emacs%2FMakefile.local;h=e34da0be13e828e8a7f3a5033c1ec23941f6ce06;hp=bda3997adadd0c2125928bb2cc53e6026e8c95c6;hb=a48f3687785b2c138b2c47848bd05512fc893a0b;hpb=33d5cc415ec31d14f126dbb19f8538b04d2c1b49 diff --git a/emacs/Makefile.local b/emacs/Makefile.local index bda3997a..e34da0be 100644 --- a/emacs/Makefile.local +++ b/emacs/Makefile.local @@ -1,21 +1,29 @@ +# -*- makefile -*- + dir := emacs -emacs_sources := $(dir)/notmuch.el +emacs_sources := \ + $(dir)/notmuch-lib.el \ + $(dir)/notmuch.el \ + $(dir)/notmuch-query.el \ + $(dir)/notmuch-show.el emacs_bytecode := $(subst .el,.elc,$(emacs_sources)) -emacs: $(emacs_bytecode) +%.elc: %.el + $(call quiet,EMACS) --directory emacs -batch -f batch-byte-compile $< + +ifeq ($(HAVE_EMACS),1) +all: $(emacs_bytecode) +endif + +install: install-emacs -install-emacs: install emacs - $(call quiet_mkdir, $(DESTDIR)/$(emacs_lispdir)) - $(call quiet_install_data, $(emacs_sources) $(emacs_bytecode) $(DESTDIR)$(emacs_lispdir)) - @echo "" - @echo "The notmuch emacs client is now installed." - @echo "" - @echo "To run this, each user should add the following line to the ~/.emacs file:" - @echo "" - @echo " (require 'notmuch)" - @echo "" - @echo "And should then run \"M-x notmuch\" from within emacs or run \"emacs -f notmuch\"" - @echo "" +.PHONY: install-emacs +install-emacs: + mkdir -p $(DESTDIR)$(emacslispdir) + install -m0644 $(emacs_sources) $(DESTDIR)$(emacslispdir) +ifeq ($(HAVE_EMACS),1) + install -m0644 $(emacs_bytecode) $(DESTDIR)$(emacslispdir) +endif CLEAN := $(CLEAN) $(emacs_bytecode)