diff options
| author | Pengji Zhang <me@pengjiz.com> | 2024-08-18 15:42:55 +0800 |
|---|---|---|
| committer | David Bremner <david@tethera.net> | 2026-01-14 07:52:08 +0900 |
| commit | 0469bcd1baf94548a4157effced6fee3a2f23cc6 (patch) | |
| tree | f784c9bc6c8b2ae5c4c0009d649635472ea944a6 /emacs/Makefile.local | |
| parent | e6e0cdff3b6ab7505666326324e7dbcb2e7714e2 (diff) | |
emacs: Generate and install autoloads
Previously when installed with 'make install', autoloads in sources
were not scraped. So users still had to load the full library
beforehand in order to use Notmuch.
Now we generate and install such a file for 'make install-emacs'. With
this change, users can replace in their Emacs configuration:
(require 'notmuch)
with a much cheaper:
(require 'notmuch-autoloads)
but are still able to use 'M-x notmuch'.
Note that this new file is not included in the 'make elpa' package, so
it does not break for those users, who have already been enjoying
autoloads generated by 'package.el'.
Besides, this should not break packaging for most distros. Even if
they have generated and maintained such a file using their package
managers, Emacs does not choke on an existing output file when
scraping autoloads.
Re: thread starting at id:87o75yl4u5.fsf@pengjiz.com
Amended-By: db; add comment about autoload-excludes
Diffstat (limited to 'emacs/Makefile.local')
| -rw-r--r-- | emacs/Makefile.local | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/emacs/Makefile.local b/emacs/Makefile.local index 0f1f0eb2..7991a859 100644 --- a/emacs/Makefile.local +++ b/emacs/Makefile.local @@ -38,6 +38,16 @@ $(dir)/notmuch-pkg.el: $(srcdir)/$(dir)/notmuch-pkg.el.tmpl all: $(dir)/notmuch-pkg.el install-emacs: $(dir)/notmuch-pkg.el +emacs_autoloads := $(dir)/notmuch-autoloads.el +ifeq ($(WITH_EMACS),1) +$(emacs_autoloads): $(emacs_sources) $(dir)/autoloads-gen.el + $(call quiet,EMACS) -batch -L emacs -l autoloads-gen.el \ + -f autoloads-gen-batch $@ $(emacs_sources) + +all: $(emacs_autoloads) +install-emacs: $(emacs_autoloads) +endif + emacs_mua := $(dir)/notmuch-emacs-mua emacs_mua_desktop := $(dir)/notmuch-emacs-mua.desktop @@ -115,6 +125,7 @@ install-emacs: $(emacs_sources) $(emacs_images) install -m0644 $(emacs_sources) "$(DESTDIR)$(emacslispdir)" ifeq ($(WITH_EMACS),1) install -m0644 $(emacs_bytecode) "$(DESTDIR)$(emacslispdir)" + install -m0644 $(emacs_autoloads) "$(DESTDIR)$(emacslispdir)" endif mkdir -p "$(DESTDIR)$(emacsetcdir)" install -m0644 $(emacs_images) "$(DESTDIR)$(emacsetcdir)" @@ -130,4 +141,4 @@ ifeq ($(WITH_DESKTOP),1) endif CLEAN := $(CLEAN) $(emacs_bytecode) $(dir)/notmuch-version.el $(dir)/notmuch-pkg.el \ - $(emacs_docstrings) docstring.stamp + $(emacs_autoloads) $(emacs_docstrings) docstring.stamp |
