From a5ed8c68f6db37d3866088a9770447eba6833109 Mon Sep 17 00:00:00 2001 From: Carl Worth Date: Tue, 6 Apr 2010 10:35:20 -0700 Subject: Makefile: Eliminate the "make install-emacs" target. Instead, simply byte-compile the emacs source files as part of "make" and install them as part of "make install". The byte compilation is made conditional on the configure script finding the emacs binary. That way, "make; make install" will still work for someone that doesn't have emacs installed, (which was the only reason we had made a separate "make install-emacs" target in the first place). --- emacs/Makefile.local | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'emacs/Makefile.local') diff --git a/emacs/Makefile.local b/emacs/Makefile.local index 51d045c3..52aca4ef 100644 --- a/emacs/Makefile.local +++ b/emacs/Makefile.local @@ -9,21 +9,21 @@ emacs_sources := \ emacs_bytecode := $(subst .el,.elc,$(emacs_sources)) -.PHONY: emacs -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 .PHONY: install-emacs -install-emacs: install emacs +install-emacs: mkdir -p $(DESTDIR)/$(emacs_lispdir) - install -m0644 $(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 "" + install -m0644 $(emacs_sources) $(DESTDIR)$(emacs_lispdir) +ifeq ($(HAVE_EMACS),1) + install -m0644 $(emacs_bytecode) $(DESTDIR)$(emacs_lispdir) +endif CLEAN := $(CLEAN) $(emacs_bytecode) -- cgit v1.2.3