X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=emacs%2FMakefile.local;h=141f5868931d597ca391b99633dd9b76007d8f73;hp=90a57cca74ed40e1f56d0b962531a6048b5c64cb;hb=HEAD;hpb=518843747835903b77889da30ce8c4518a5c0574 diff --git a/emacs/Makefile.local b/emacs/Makefile.local index 90a57cca..0f1f0eb2 100644 --- a/emacs/Makefile.local +++ b/emacs/Makefile.local @@ -1,4 +1,4 @@ -# -*- makefile -*- +# -*- makefile-gmake -*- dir := emacs emacs_sources := \ @@ -24,6 +24,8 @@ emacs_sources := \ $(dir)/notmuch-company.el \ $(dir)/notmuch-draft.el +elpa_sources := ${emacs_sources} $(dir)/notmuch-pkg.el + $(dir)/notmuch-version.el: $(dir)/Makefile.local version.stamp $(dir)/notmuch-version.el: $(srcdir)/$(dir)/notmuch-version.el.tmpl @sed -e 's/%AG%/Generated file (from $( $@.tmp && \ @@ -68,16 +82,29 @@ $(dir)/notmuch-lib.elc: $(dir)/notmuch-version.elc endif CLEAN+=$(dir)/.eldeps $(dir)/.eldeps.tmp $(dir)/.eldeps.x -ifeq ($(HAVE_EMACS),1) +ifeq ($(WITH_EMACS),1) %.elc: %.el $(global_deps) $(call quiet,EMACS) --directory emacs -batch -f batch-byte-compile $< +%.rsti: %.el + $(call quiet,EMACS) -batch -L emacs -l rstdoc -f rstdoc-batch-extract $< $@ endif +elpa: $(ELPA_FILE) + +ELPA_DIR=.elpa-build/notmuch-${ELPA_VERSION} +notmuch-emacs-%.tar: ${elpa_sources} build-info + mkdir -p .elpa-build/notmuch-${ELPA_VERSION} + cp ${elpa_sources} ${ELPA_DIR} +ifeq ($(HAVE_SPHINX)$(HAVE_MAKEINFO)$(HAVE_INSTALL_INFO),111) + cp ${INFO_INFO_FILES} ${ELPA_DIR} + for file in ${INFO_INFO_FILES}; do install-info $$file ${ELPA_DIR}/dir; done +endif + tar -C .elpa-build -cf $@ notmuch-${ELPA_VERSION} + rm -r .elpa-build + ifeq ($(WITH_EMACS),1) -ifeq ($(HAVE_EMACS),1) -all: $(emacs_bytecode) +all: $(emacs_bytecode) $(emacs_docstrings) install-emacs: $(emacs_bytecode) -endif install: install-emacs endif @@ -86,10 +113,21 @@ endif install-emacs: $(emacs_sources) $(emacs_images) mkdir -p "$(DESTDIR)$(emacslispdir)" install -m0644 $(emacs_sources) "$(DESTDIR)$(emacslispdir)" -ifeq ($(HAVE_EMACS),1) +ifeq ($(WITH_EMACS),1) install -m0644 $(emacs_bytecode) "$(DESTDIR)$(emacslispdir)" endif mkdir -p "$(DESTDIR)$(emacsetcdir)" install -m0644 $(emacs_images) "$(DESTDIR)$(emacsetcdir)" + mkdir -p "$(DESTDIR)$(prefix)/bin/" +ifeq ($(HAVE_BASH),1) + sed "1s|^#!.*|#! $(BASH_ABSOLUTE)|" < $(emacs_mua) > $(DESTDIR)$(prefix)/bin/notmuch-emacs-mua + chmod 755 $(DESTDIR)$(prefix)/bin/notmuch-emacs-mua +endif +ifeq ($(WITH_DESKTOP),1) + mkdir -p "$(DESTDIR)$(desktop_dir)" + desktop-file-install --mode 0644 --dir "$(DESTDIR)$(desktop_dir)" $(emacs_mua_desktop) + -update-desktop-database "$(DESTDIR)$(desktop_dir)" +endif -CLEAN := $(CLEAN) $(emacs_bytecode) $(dir)/notmuch-version.el $(dir)/notmuch-pkg.el +CLEAN := $(CLEAN) $(emacs_bytecode) $(dir)/notmuch-version.el $(dir)/notmuch-pkg.el \ + $(emacs_docstrings) docstring.stamp