emacs-devel
[Top][All Lists]
Advanced

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

Re: reftex.el autoloads


From: Phillip Lord
Subject: Re: reftex.el autoloads
Date: Fri, 18 Dec 2015 22:05:30 +0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

Eli Zaretskii <address@hidden> writes:
>> > Also, there shouldn't need to be an autoloads-force at all: if some
>> > other files need to be built they should be listed as dependencies of
>> > autoload.
>> 
>> 
>> Indeed. It's always been this way, though -- from a non-bootstrap on
>> emacs-25 try
>
> Any reason why you need explicit Makefile targets for the new files?
> Why not model them on calc/calc-loaddefs.el, which has not target in
> the Makefile at all?

Ah, just realised what you were asking.

The problem is this rule.

$(lisp)/loaddefs.el: $(LOADDEFS)
        @echo Directories for loaddefs: ${SUBDIRS_ALMOST}
        $(AM_V_GEN)$(emacs) -l autoload \
            --eval '(setq autoload-ensure-writable t)' \
            --eval '(setq autoload-builtin-package-versions t)' \
            --eval '(setq generated-autoload-file (expand-file-name 
(unmsys--file-name "$@")))' \
            -f batch-update-autoloads ${SUBDIRS_ALMOST}

So batch-update-autoloads only gets call if loaddefs.el is out-of-date.
If reftex-loaddefs is out of date, then it does not, and so
reftex-loaddefs will not get build.

The intuitive solution is do

$(lisp)/loaddefs.el $(lisp)/textmodes/reftex-loadefs.el $(AND_ALL_THE_OTHERS): 
$(LOADDEFS)
        @echo Directories for loaddefs: ${SUBDIRS_ALMOST}
        $(AM_V_GEN)$(emacs) -l autoload \
            --eval '(setq autoload-ensure-writable t)' \
            --eval '(setq autoload-builtin-package-versions t)' \
            --eval '(setq generated-autoload-file (expand-file-name 
(unmsys--file-name "$@")))' \
            -f batch-update-autoloads ${SUBDIRS_ALMOST}

but this fails because make actually runs batch-update-autoloads
multiple times which is both wasteful and causes a race condition with
-j.

As this doesn't work, I didn't do it (I tried it!). Instead, I added
autoloads-force. It's ugly, but it's explicit and ugly rather than
implicit and ugly.

Phil



reply via email to

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