branch: externals/auctex commit e835b95bc8108cc82b2fe3660ae0574d0f57206c Author: Arash Esbati <ar...@gnu.org> Commit: Tassilo Horn <t...@gnu.org>
Generate auctex-autoloads.el in a way compatible with emacs 27.1 --- GNUmakefile | 34 ++++++++++++++++++++++++++++++---- 1 file changed, 30 insertions(+), 4 deletions(-) diff --git a/GNUmakefile b/GNUmakefile index 4fb8829124..8dacf6281f 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -40,12 +40,38 @@ ALL_GENERATED_FILES=$(MAIN_GENERATED_FILES) \ $(INFO_FILES) # Generate & compile everything including the manuals below doc/. -all: $(ALL_GENERATED_FILES) compile autoloads +all: $(ALL_GENERATED_FILES) compile auctex-autoloads.el compile: $(patsubst %.el,%.elc,$(wildcard *.el style/*.el)) -autoloads: - $(EMACS) -f loaddefs-generate-batch loaddefs.el . +# If we were depending on emacs 29.1, we could simply use +# loaddefs-generate. If we were depending on 28.1, we could still use +# update-directory-autoloads... +AUTOLOAD=--eval '\ +(let* ((autoload-file (expand-file-name "$@")) \ + (autoload-file-dir (file-name-directory autoload-file))) \ + (if (fboundp `loaddefs-generate) \ + (loaddefs-generate autoload-file-dir autoload-file \ + (list "tex-wizard.el") \ + "(add-to-list `load-path\n\ + (directory-file-name\n\ + (file-name-directory load-file-name)))")\ + (mapc (lambda (file) \ + (update-file-autoloads file nil autoload-file)) \ + command-line-args-left)) \ + (save-buffers-kill-emacs t))' + +auctex-autoloads.el: + -rm -f $@ + $(EMACS) $(AUTOLOAD) $(wildcard *.el) + +# auctex-autoloads.el: +# $(EMACS) --eval \ +# "(loaddefs-generate \".\" \"auctex-autoloads.el\" nil \"\ +# (add-to-list 'load-path\n\ +# (directory-file-name\n\ +# (file-name-directory load-file-name)))\ +# \")" %.elc: %.el $(EMACS) -f batch-byte-compile $< @@ -64,7 +90,7 @@ elpa: $(MAIN_GENERATED_FILES) clean: rm -f $(ALL_GENERATED_FILES) \ $(wildcard *.elc style/*.elc) \ - loaddefs.el + auctex-autoloads.el # Copied&adapted from doc/Makefile.in. MAKEINFO_PLAIN=$(MAKEINFO) -D rawfile --no-headers