[Top][All Lists]

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


From: Luc Teirlinck
Subject: ldefs-boot.el
Date: Fri, 12 Aug 2005 14:49:20 -0500 (CDT)

I recently had to update ldefs-boot.el because a new autoload cookie
for a variable had been added.  The autoload made its way into
loaddefs.el but not into ldefs-boot.el.  The strange thing was that when
the autoload was needed and bootstrapping failed because it was not
available, loaddefs.el had already been regenerated and the variable
was already defined in it.  But apparently only ldefs-boot.el and not
the updated loaddefs.el had been loaded at that stage.

Is the moral of this story that each time that somebody adds a new
autoload that is necessary for compilation during bootstrapping (as
opposed to just an autoload that allows the user to call an
interactive function without having to load the file first), one has
to update ldefs-boot by overwriting it with a valid up to date copy of
loaddefs.el?  If so how many people are aware of this?

>From the Changelog, it appears that ldefs-boot.el had to be updated
four times for similar reasons.  But my guess is that in the vast
majority of cases, when people get an error message during bootstrap
saying that a variable or function is not defined, they just add a
require (or a defvar).  There is no telling how many unnecessary
require's have been added in the Emacs code because of this situation.

I am not very familiar at all with the bootstrapping process and the
various Makefile's, but I wonder whether there really is no better way
to handle this.  If not, we could see what could be done to make more
people who contribute to Emacs CVS aware of the ldefs-boot.el
situation; in particular, when it is necessary to update it and how it
should be done.  (I had to figure it out by doing a lot of grepping
through the Makefile's and through the emacs-devel archives.)

The comment in lisp/Makefile.in is less than self-explanatory:

# Build loaddefs.el to make sure it's up-to-date.  If it's not, that
# might lead to errors during the bootstrap because something fails to
# autoload as expected.  If there is no emacs binary, then we can't
# build autoloads yet.  In that case we have to use ldefs-boot.el;
# bootstrap should always work with ldefs-boot.el.

No, it does not always work.  (How could it?)  It only works if you
update ldefs-boot whenever needed.



 LocalWords:  Changelog defvar

reply via email to

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