unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* generated-autoload-file sometimes not created
@ 2008-04-09 18:51 Glenn Morris
  2008-04-09 20:16 ` Stefan Monnier
  0 siblings, 1 reply; 6+ messages in thread
From: Glenn Morris @ 2008-04-09 18:51 UTC (permalink / raw)
  To: emacs-devel


I have locally added (rightly, I think) calc/calc-loaddefs.el to
AUTOGENEL in lisp/Makefile.in. However, it is not recreated on
bootstrapping if the timestamp of calc/*.el is older than that of
loaddefs.el (at least, I think this is what is happening). I believe
this indicates a bug in the code that generates autoload files.




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: generated-autoload-file sometimes not created
  2008-04-09 18:51 generated-autoload-file sometimes not created Glenn Morris
@ 2008-04-09 20:16 ` Stefan Monnier
  2008-04-10  8:02   ` Mike Mattie
  2008-04-11  3:56   ` Glenn Morris
  0 siblings, 2 replies; 6+ messages in thread
From: Stefan Monnier @ 2008-04-09 20:16 UTC (permalink / raw)
  To: Glenn Morris; +Cc: emacs-devel

> I have locally added (rightly, I think) calc/calc-loaddefs.el to
> AUTOGENEL in lisp/Makefile.in.  However, it is not recreated on
> bootstrapping if the timestamp of calc/*.el is older than that of
> loaddefs.el (at least, I think this is what is happening).  I believe
> this indicates a bug in the code that generates autoload files.

Indeed, we have a problem: "make bootstrap" will not recreate all the
autoloads, but only those of the files that are more recent than
ldefs-boot.el.

So I suggest the patch below.  Can someone test it and fix/install it?


        Stefan


Index: lisp/loadup.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/loadup.el,v
retrieving revision 1.162
diff -u -r1.162 loadup.el
--- lisp/loadup.el	9 Apr 2008 03:44:26 -0000	1.162
+++ lisp/loadup.el	9 Apr 2008 20:15:12 -0000
@@ -81,7 +81,13 @@
 (message "Lists of integers (garbage collection statistics) are normal output")
 (message "while building Emacs; they do not indicate a problem.")
 (message "%s" (garbage-collect))
-(load "loaddefs.el")  ;Don't get confused if someone compiled this by mistake.
+
+(condition-case nil
+    ;; Don't get confused if someone compiled this by mistake.
+    (load "loaddefs.el")
+  ;; In case loaddefs hasn't been generated yet.
+  (file-error (load "ldefs-boot.el")))
+
 (message "%s" (garbage-collect))
 (load "simple")
 
Index: lisp/Makefile.in
===================================================================
RCS file: /sources/emacs/emacs/lisp/Makefile.in,v
retrieving revision 1.104
diff -u -r1.104 Makefile.in
--- lisp/Makefile.in	8 Apr 2008 22:12:12 -0000	1.104
+++ lisp/Makefile.in	9 Apr 2008 20:15:12 -0000
@@ -277,11 +277,8 @@
 bootstrap-prepare:
 	if test -x $(EMACS); then				\
 	  $(MAKE) $(MFLAGS) autoloads;				\
-	else							\
-	  cp $(lisp)/ldefs-boot.el $(lisp)/loaddefs.el;		\
 	fi
-	chmod +w $(lisp)/loaddefs.el		\
-	  $(lisp)/ps-print.el			\
+	chmod +w $(lisp)/ps-print.el			\
 	  $(lisp)/emacs-lisp/cl-loaddefs.el
 
 maintainer-clean: distclean bootstrap-clean




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: generated-autoload-file sometimes not created
  2008-04-09 20:16 ` Stefan Monnier
@ 2008-04-10  8:02   ` Mike Mattie
  2008-04-10 19:15     ` Stefan Monnier
  2008-04-11  3:56   ` Glenn Morris
  1 sibling, 1 reply; 6+ messages in thread
From: Mike Mattie @ 2008-04-10  8:02 UTC (permalink / raw)
  To: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 1340 bytes --]

On Wed, 09 Apr 2008 16:16:14 -0400
Stefan Monnier <monnier@iro.umontreal.ca> wrote:

> > I have locally added (rightly, I think) calc/calc-loaddefs.el to
> > AUTOGENEL in lisp/Makefile.in.  However, it is not recreated on
> > bootstrapping if the timestamp of calc/*.el is older than that of
> > loaddefs.el (at least, I think this is what is happening).  I
> > believe this indicates a bug in the code that generates autoload
> > files.
> 
> Indeed, we have a problem: "make bootstrap" will not recreate all the
> autoloads, but only those of the files that are more recent than
> ldefs-boot.el.
> 
> So I suggest the patch below.  Can someone test it and fix/install it?
> 

The patch applied with minor fuzz. No bacon, same crash on darwin.

Wrote /Users/mattie/system/emacs/dist/emacs/lisp/calc/ 
calccomp.elcCompiling /Users/mattie/system/emacs/dist/emacs/lisp/./ 
calc/calcsel2.elWrote /Users/mattie/system/emacs/dist/emacs/lisp/calc/ 
calcsel2.elcCompiling /Users/mattie/system/emacs/dist/emacs/lisp/./ 
calendar/appt.el
In toplevel form:calendar/appt.el:78:1:Error: Required feature `cal- 
loaddefs' was not providedmake[2]: *** [compile] Error 1make[1]: ***  
[bootstrap-build] Error 2make: *** [bootstrap] Error 2

btw, sorry about the multiple sends on the darwin report.


Cheers,
Mike Mattie


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: generated-autoload-file sometimes not created
  2008-04-10  8:02   ` Mike Mattie
@ 2008-04-10 19:15     ` Stefan Monnier
  0 siblings, 0 replies; 6+ messages in thread
From: Stefan Monnier @ 2008-04-10 19:15 UTC (permalink / raw)
  To: Mike Mattie; +Cc: emacs-devel

> In toplevel form:calendar/appt.el:78:1:Error: Required feature `cal- 
> loaddefs' was not providedmake[2]: *** [compile] Error 1make[1]: ***  
> [bootstrap-build] Error 2make: *** [bootstrap] Error 2

> btw, sorry about the multiple sends on the darwin report.

This is only indirectly related to this thread.  My patch isn't trying
to fix your problem (which is already fixed by something else, check
the archive it's been reported about 10 times in the last week).


        Stefan




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: generated-autoload-file sometimes not created
  2008-04-09 20:16 ` Stefan Monnier
  2008-04-10  8:02   ` Mike Mattie
@ 2008-04-11  3:56   ` Glenn Morris
  2008-04-11 16:06     ` Stefan Monnier
  1 sibling, 1 reply; 6+ messages in thread
From: Glenn Morris @ 2008-04-11  3:56 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

Stefan Monnier wrote:

> So I suggest the patch below.  Can someone test it and fix/install it?

I guess this will have the effect of scanning every file for an
autoload while bootstrapping, which is inefficient but not important.

IIUC, if I happen to delete just calc-loaddefs.el and then run `make
autoloads', it won't be recreated. I don't have a better solution
though...

(I guess the autoload time-stamp check is to reduce the number of
files that need to be read, and checking for a local value of
generated-autoload-file would defeat that?)




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: generated-autoload-file sometimes not created
  2008-04-11  3:56   ` Glenn Morris
@ 2008-04-11 16:06     ` Stefan Monnier
  0 siblings, 0 replies; 6+ messages in thread
From: Stefan Monnier @ 2008-04-11 16:06 UTC (permalink / raw)
  To: Glenn Morris; +Cc: emacs-devel

>> So I suggest the patch below.  Can someone test it and fix/install it?

> I guess this will have the effect of scanning every file for an
> autoload while bootstrapping, which is inefficient but not important.

Yes, the "inefficiency" isn't much of a problem.  The main source of
inefficiency of bootstrap is the time it takes to byte-compile every
file.  The autoloads are negligible in comparison.

Also, reconstructing the loaddefs.el file from scratch is a good
practice, since it ensures we don't carry along old stuff from
ldefs-boot.el.  I.e. it's a cleaner bootstrap.

> IIUC, if I happen to delete just calc-loaddefs.el and then run `make
> autoloads', it won't be recreated. I don't have a better solution though...

If it hurts, don't do that.

> (I guess the autoload time-stamp check is to reduce the number of
> files that need to be read, and checking for a local value of
> generated-autoload-file would defeat that?)

Exactly.


        Stefan




^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2008-04-11 16:06 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-09 18:51 generated-autoload-file sometimes not created Glenn Morris
2008-04-09 20:16 ` Stefan Monnier
2008-04-10  8:02   ` Mike Mattie
2008-04-10 19:15     ` Stefan Monnier
2008-04-11  3:56   ` Glenn Morris
2008-04-11 16:06     ` Stefan Monnier

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).