emacs-devel
[Top][All Lists]
Advanced

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

Fixing the lisp/loaddefs.el situation


From: Miles Bader
Subject: Fixing the lisp/loaddefs.el situation
Date: 13 Sep 2003 11:01:12 +0900

lisp/loaddefs.el is a pain because it's both in the CVS repository _and_
a commonly regenerated file, meaning that it shows up as being modified
by `cvs update' and will be committed if you do `cvs commit' (even if
nothing of substance changed, there usually seems to be enough noise to
cause this).  Not only is this messy, it can be very aggravating for
users with slow network connections -- cvs has the annoying property of
sending the entire contents of changed files to the server (so the
server can compute the delta), and loaddefs.el is a pretty big file.

I've fixed this by renaming `loaddefs.el' to `loaddefs-boot.el', and
changing lisp/Makefile.in to copy the former from the latter when
necessary (basically during bootstrap-clean, only if there's no existing
loaddefs.el, and no emacs binary to build it with).*

Because this change will remove loaddefs.el from the repository, cvs
will delete it from working directories when doing a `cvs update', so
it will be necessary for people to either do `make -C lisp autoloads'
or `make bootstrap' or something.

Does anyone have any objection to this change?

Thanks,

-Miles


* added files

    lisp/loaddefs-boot.el

* modified files

--- orig/lisp/Makefile.in
+++ mod/lisp/Makefile.in
@@ -80,6 +80,7 @@
        $(lisp)/language/utf-8-lang.el \
        $(lisp)/language/georgian.el \
        $(lisp)/loaddefs.el \
+       $(lisp)/loaddefs-boot.el \
        $(lisp)/loadup.el \
        $(lisp)/mail/blessmail.el \
        $(lisp)/patcomp.el \
@@ -186,11 +187,11 @@
        $(emacs) -f batch-update-authors $(srcdir)/AUTHORS $(srcdir)
 
 TAGS: $(lisptagsfiles1) $(lisptagsfiles2)
-       els=`echo $(lisptagsfiles1) $(lisptagsfiles2) | sed -e 
"s,$(lisp)/loaddefs.el,,"`; \
+       els=`echo $(lisptagsfiles1) $(lisptagsfiles2) | sed -e 
"s,$(lisp)/loaddefs.*\.el,,"`; \
        ${ETAGS} $$els
 
 TAGS-LISP: $(lisptagsfiles1) $(lisptagsfiles2)
-       els=`echo $(lisptagsfiles1) $(lisptagsfiles2) | sed -e 
"s,$(lisp)/loaddefs.el,,"`; \
+       els=`echo $(lisptagsfiles1) $(lisptagsfiles2) | sed -e 
"s,$(lisp)/loaddefs.*\.el,,"`; \
        ${ETAGS} -o TAGS-LISP $$els
 
 .SUFFIXES: .elc .el
@@ -274,14 +275,27 @@
 recompile: doit
        $(EMACS) $(EMACSOPT) -f batch-byte-recompile-directory $(lisp)
 
-# Prepare a bootstrap in the lisp subdirectory.  Build loaddefs.el,
-# because it's not sure it's up-to-date, and if it's not, that might
-# lead to errors during the bootstrap because something fails to
-# autoload as expected.  Remove compiled Lisp files so that
-# bootstrap-emacs will be built from sources only.
+# Prepare a bootstrap in the lisp subdirectory.
+#
+# Build loaddefs.el, because it's not sure it's up-to-date, and if it's not,
+# that might lead to errors during the bootstrap because something fails to
+# autoload as expected.  However, if there is no emacs binary, then we can't
+# build autoloads yet, so just make sure there's some loaddefs.el file, as
+# it's necessary for generating the binary (because loaddefs.el is an
+# automatically generated file, we don't want to store it in the source
+# repository).
+#
+# Remove compiled Lisp files so that bootstrap-emacs will be built from
+# sources only.
 
 bootstrap-clean:
-       if test -x $(EMACS); then $(MAKE) $(MFLAGS) autoloads; fi
+       if test -x $(EMACS); then                               \
+         $(MAKE) $(MFLAGS) autoloads;                          \
+       else                                                    \
+         if ! test -r $(lisp)/loaddefs.el; then                \
+           cp $(lisp)/loaddefs-boot.el $(lisp)/loaddefs.el;    \
+         fi                                                    \
+       fi
        cd $(lisp); rm -f *.elc */*.elc
 
 # Generate/update files for the bootstrap process.


-- 
`...the Soviet Union was sliding in to an economic collapse so comprehensive
 that in the end its factories produced not goods but bads: finished products
 less valuable than the raw materials they were made from.'  [The Economist]




reply via email to

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