emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Reworking loaddefs.el generation


From: Lars Ingebrigtsen
Subject: Reworking loaddefs.el generation
Date: Fri, 27 May 2022 12:53:54 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

I've been working a bit on making loaddef file generation faster (and
easier to comrehend).  Building loaddefs currently takes about 10
seconds (on my build machine), and I've got it down to 2 seconds.  (For
my "make -j32" build, this means a reduction of 6% time, since that bit
is single-threaded and make doesn't have anything else to schedule while
Emacs is working.)

But there's some bits here I don't quite understand.  We have, for
instance:

# Update MH-E internal autoloads. These are not to be confused with
# the autoloads for the MH-E entry points, which are already in loaddefs.el.
MH_E_DIR = $(lisp)/mh-e
MH_E_SRC = $(sort $(wildcard ${MH_E_DIR}/mh*.el))
MH_E_SRC := $(filter-out ${MH_E_DIR}/mh-loaddefs.el,${MH_E_SRC})

.PHONY: mh-autoloads
mh-autoloads: $(MH_E_DIR)/mh-loaddefs.el
$(MH_E_DIR)/mh-loaddefs.el: $(MH_E_SRC)
        $(emacs) -l autoload \
           --eval "(setq generate-autoload-cookie \";;;###mh-autoload\")" \
           --eval "(setq generated-autoload-file (expand-file-name 
(unmsys--file-name \"$@\")))" \
           -f batch-update-autoloads $(MH_E_DIR)

But if I say:

$ touch lisp/mh-e/mh-e.el
$ make

The lisp/mh-e/mh-loaddefs.el is not regenerated.  So either this
Makefile snippet doesn't work, or I'm misreading what it's trying to do
(which is quite possible).

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




reply via email to

[Prev in Thread] Current Thread [Next in Thread]