Subject: Re: bug#36369: Master doesn't use its pdump

From: Eli Zaretskii <[email-masked]>
Date: Sat, 29 Jun 2019 10:14:28 +0300

> From: Richard Stallman <[email-masked]>
> Cc: [email-masked]
> Date: Fri, 28 Jun 2019 23:18:46 -0400
> 
>   > I think I understand why it doesn't complete the build for you: it's
>   > because you say "make -k emacs" instead of just "make -k". 
> 
> I think that is a bug.
> 
> Makefile seems not to have a separate rule for the file
> 'emacs.pdump'.  It treats that as an aspect of 'emacs'.  Thus, the
> 'emacs' rule should write 'emacs.pdmp' correctly too.

I think this is problematic because we still support the unexec build
as well.  That build doesn't produce emacs.pdmp at all.

> I tried 'make -k' just now.  It did write 'emacs.pdmp'.
> 
> Then I deleted 'alloc.o' and then 'make -k'.
> It loaded up and dumped, writing 'boostrap-emacs.pdmp'.
> Then it loaded up and dumped again, writing 'emacs.pdmp'.
> 
> That was not necessary.  Once should have been enough.

It's enough when all the Lisp files are already byte-compiled.  When
some of them aren't, the two dumps are not identical, as the first one
loads the uncompiled Lisp files, the second one loads the compiled
ones.  And there are other potential changes, as the first dump runs
temacs with --temacs=pbootstrap switch, the second with --temacs=pdump.
See loadup.el for how these are different.

> 								Can't you
>   > omit the "emacs" part?  If not, why not?
> 
> The reason I omit it is that this was, in the past, a way to avoid
> rebuilding stuff I didn't need to rebuild.  Perhaps it was to avoid
> recompiling Lisp files (which takes a long time so I always chose
> manually what to recompile).  I don't remewmber for sure.

If you don't want to compile Lisp files automatically, I think saying
"make -k emacs.pdmp" should be your new paradigm.

> But it still seems like an error that the 'emacs' target does not
> deliver a working 'emacs'.

If we can tweak src/Makefile.in to do that, while not losing the
ability to support unexec, it would be a good change, I agree.