Subject: bug#2151: 23.0.90; Building the 23.0.90 pretest recompiles Lisp files

From: Eli Zaretskii <[email-masked]>
Date: Mon, 02 Feb 2009 22:42:43 +0200

> From: Stefan Monnier <[email-masked]>
> Cc: [email-masked],  [email-masked]
> Date: Mon, 02 Feb 2009 11:02:49 -0500
> 
> > It goes like this: since temacs is built, the last rule says to
> > produce bootstrap-emacs${EXEEXT}.  The new bootstrap-emacs then
> > triggers the 2 rules before it, which rebuild loaddefs.el and
> > recompile the Lisp files in ${lisp} and ${SOME_MACHINE_LISP}.
> 
> I think we have to live with this for now.

I feared you'd say that.  All I can say is that I think it's
fundamentally wrong to have Lisp files compile as part of the build
(Yes, I know we compile Leim files, presumably to conserve space in
the tarball, but I think that's wrong, too.)  The result is that a
successful build becomes less predictable, and we can no longer depend
on having the same good .elc files on all platforms.

(It is also a major headache for the DOS port, since lisp/Makefile
needs a Unixy shell, and I always avoided requiring that for building
an official release.)

> Getting make to understand the nature of the dependencies here is pretty
> tricky, so you can get it to work right for the tarball or you can get
> it to work right for the "cvs update" case, but it's pretty painful
> to get it to work right in both cases.

I think it shouldn't be too hard, and the ideas you suggested further
in your mail are my evidence.

> PS: Part of the problem, as far as I understand it, is that we need
> the .elc files to depend on bootstrap-emacs so as to tell `make' to
> build bootstrap-emacs when needed, but we don't actually need the .elc
> files to be newer than bootstrap-emacs (in some rare cases a newer
> bootstrap-emacs will compile the .el differently, but in general it's
> not the case).  But `make' doesn't have such a concept of a dependency
> that "needs to exist, but doesn't need to be older".

I don't think we need a bootstrap-emacs in a released version at all.
We could add some file to the tarball, generated at make-dist time, to
signal that bootstrap-emacs is not needed.  That file could actually
be named `bootstrap-emacs', which should resolve the problem nicely
(assuming we manage to have it older than the oldest .elc file).