all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Fixing the lisp/loaddefs.el situation
@ 2003-09-13  2:01 Miles Bader
  2003-09-13  6:29 ` Frank Schmitt
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Miles Bader @ 2003-09-13  2:01 UTC (permalink / raw)


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]

^ permalink raw reply	[flat|nested] 10+ messages in thread
* Re: Fixing the lisp/loaddefs.el situation
@ 2003-09-15  6:51 David PONCE
  2003-09-16  2:23 ` Miles Bader
  0 siblings, 1 reply; 10+ messages in thread
From: David PONCE @ 2003-09-15  6:51 UTC (permalink / raw)
  Cc: emacs-devel

Hi Miles,

>>Looks good.  What about lisp/makefile-w32.in?
> 
> 
> I have no idea about that; a cursory glance shows lots of things
> commented out from the normal makefile, and some weird shit to deal with
> different command interpreter types, so I think it's best to leave it to
> the experts (if there be any).

I propose you this patch for lisp/makefile.w32-in, took from your
changes to lisp/Makefile.in.  I managed to bootstrap today's CVS
version of Emacs on my Windows NT box, using latest MinGW 3.0.0-1
toolkit and the "sh" shell environment provided by cygwin.  Hope it
will help.

David

Index: lisp/makefile.w32-in
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/makefile.w32-in,v
retrieving revision 1.31
diff -c -r1.31 makefile.w32-in
*** lisp/makefile.w32-in	1 Sep 2003 15:45:13 -0000	1.31
--- lisp/makefile.w32-in	15 Sep 2003 06:39:05 -0000
***************
*** 87,92 ****
--- 87,93 ----
  	$(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 \
***************
*** 352,373 ****
  recompile: doit
  	$(emacs) -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.
  
  # Need separate version for sh and native cmd.exe
  bootstrap-clean: bootstrap-clean-$(SHELLTYPE) loaddefs.el
  
  bootstrap-clean-CMD:
  #	if exist $(EMACS) $(MAKE) $(MFLAGS) autoloads
  	-for %f in (. $(WINS)) do for %g in (%f\*.elc) do @$(DEL) %g
  
  bootstrap-clean-SH:
  #	if test -f $(EMACS); then $(MAKE) $(MFLAGS) autoloads; fi
  #	-rm -f $(lisp)/*.elc $(lisp)/*/*.elc
  	-for dir in . $(WINS); do rm -f $$dir/*.elc; done
  
  # Generate/update files for the bootstrap process.
--- 353,385 ----
  recompile: doit
  	$(emacs) -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.  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.
  
  # Need separate version for sh and native cmd.exe
  bootstrap-clean: bootstrap-clean-$(SHELLTYPE) loaddefs.el
  
  bootstrap-clean-CMD:
  #	if exist $(EMACS) $(MAKE) $(MFLAGS) autoloads
+ 	if not exist $(lisp)\loaddefs.el cp $(lisp)/loaddefs-boot.el $(lisp)/loaddefs.el
  	-for %f in (. $(WINS)) do for %g in (%f\*.elc) do @$(DEL) %g
  
  bootstrap-clean-SH:
  #	if test -f $(EMACS); then $(MAKE) $(MFLAGS) autoloads; fi
  #	-rm -f $(lisp)/*.elc $(lisp)/*/*.elc
+ 	if ! test -r $(lisp)/loaddefs.el; then \
+ 	  cp $(lisp)/loaddefs-boot.el $(lisp)/loaddefs.el; \
+ 	fi
  	-for dir in . $(WINS); do rm -f $$dir/*.elc; done
  
  # Generate/update files for the bootstrap process.

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

end of thread, other threads:[~2003-09-23  6:14 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-09-13  2:01 Fixing the lisp/loaddefs.el situation Miles Bader
2003-09-13  6:29 ` Frank Schmitt
2003-09-13  7:03 ` David Ponce
2003-09-13 12:52   ` Miles Bader
2003-09-15  6:38 ` Miles Bader
2003-09-22 17:46   ` Eli Zaretskii
2003-09-22 22:50     ` Miles Bader
2003-09-23  6:14       ` Eli Zaretskii
  -- strict thread matches above, loose matches on Subject: below --
2003-09-15  6:51 David PONCE
2003-09-16  2:23 ` Miles Bader

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.