From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: phillip.lord@russet.org.uk (Phillip Lord) Newsgroups: gmane.emacs.devel Subject: Re: reftex.el autoloads Date: Fri, 18 Dec 2015 22:05:30 +0000 Message-ID: <87mvt7h0ph.fsf@russet.org.uk> References: <87h9jqo9a5.fsf@russet.org.uk> <566B2BFC.1070802@cs.ucla.edu> <877fkj1q5j.fsf@russet.org.uk> <83si375x03.fsf@gnu.org> <8737v71oo0.fsf@russet.org.uk> <83r3ir5vrb.fsf@gnu.org> <87y4czz7ul.fsf@russet.org.uk> <83oadv58fm.fsf@gnu.org> <87h9jmks0u.fsf@russet.org.uk> <87zixexam5.fsf@russet.org.uk> <0ltwnjbj6q.fsf@fencepost.gnu.org> <87zixagvs4.fsf@russet.org.uk> <83io3xzqo3.fsf@gnu.org> <877fkcyd7r.fsf@russet.org.uk> <56743E61.8060102@cs.ucla.edu> <871tajiiir.fsf@russet.org.uk> <8360zvwipd.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1450476367 20871 80.91.229.3 (18 Dec 2015 22:06:07 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 18 Dec 2015 22:06:07 +0000 (UTC) Cc: rgm@gnu.org, eggert@cs.ucla.edu, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Dec 18 23:05:58 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1aA39w-0000iy-Bp for ged-emacs-devel@m.gmane.org; Fri, 18 Dec 2015 23:05:56 +0100 Original-Received: from localhost ([::1]:35277 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aA39q-0000XF-FK for ged-emacs-devel@m.gmane.org; Fri, 18 Dec 2015 17:05:50 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60203) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aA39k-0000Wi-1i for emacs-devel@gnu.org; Fri, 18 Dec 2015 17:05:47 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aA39e-0004Gk-Iq for emacs-devel@gnu.org; Fri, 18 Dec 2015 17:05:39 -0500 Original-Received: from cheviot22.ncl.ac.uk ([128.240.234.22]:45480) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aA39Y-0004Fn-Hi; Fri, 18 Dec 2015 17:05:32 -0500 Original-Received: from smtpauth-vm.ncl.ac.uk ([10.8.233.129] helo=smtpauth.ncl.ac.uk) by cheviot22.ncl.ac.uk with esmtp (Exim 4.63) (envelope-from ) id 1aA39X-0000uI-F1; Fri, 18 Dec 2015 22:05:31 +0000 Original-Received: from cpc6-benw10-2-0-cust45.gate.cable.virginm.net ([92.238.179.46] helo=localhost) by smtpauth.ncl.ac.uk with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.63) (envelope-from ) id 1aA39X-0006FG-F5; Fri, 18 Dec 2015 22:05:31 +0000 In-Reply-To: <8360zvwipd.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 18 Dec 2015 23:27:42 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 128.240.234.22 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:196494 Archived-At: Eli Zaretskii 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