Misc fixes, and use lexical-binding in more files.
[bpt/emacs.git] / lisp / Makefile.in
index 06c8218..268a45d 100644 (file)
@@ -70,12 +70,22 @@ AUTOGENEL = loaddefs.el \
        cedet/ede/loaddefs.el \
        cedet/srecode/loaddefs.el
 
+# Value of max-lisp-eval-depth when compiling initially.
+# During bootstrapping the byte-compiler is run interpreted when compiling
+# itself, and uses more stack than usual.
+#
+BIG_STACK_DEPTH = 1200
+BIG_STACK_OPTS = --eval "(setq max-lisp-eval-depth $(BIG_STACK_DEPTH))"
+
 # Files to compile before others during a bootstrap.  This is done to
 # speed up the bootstrap process.
 
 COMPILE_FIRST = \
        $(lisp)/emacs-lisp/bytecomp.elc \
        $(lisp)/emacs-lisp/byte-opt.elc \
+       $(lisp)/emacs-lisp/pcase.elc \
+       $(lisp)/emacs-lisp/macroexp.elc \
+       $(lisp)/emacs-lisp/cconv.elc \
        $(lisp)/emacs-lisp/autoload.elc
 
 # The actual Emacs command run in the targets below.
@@ -195,7 +205,9 @@ compile-onefile:
        @echo Compiling $(THEFILE)
        @# Use byte-compile-refresh-preloaded to try and work around some of
        @# the most common bootstrapping problems.
-       @$(emacs) -l bytecomp -f byte-compile-refresh-preloaded $(BYTE_COMPILE_EXTRA_FLAGS) -f batch-byte-compile $(THEFILE)
+       @$(emacs) $(BIG_STACK_OPTS) -l bytecomp $(BYTE_COMPILE_EXTRA_FLAGS) \
+               -f byte-compile-refresh-preloaded \
+               -f batch-byte-compile $(THEFILE)
 
 # Files MUST be compiled one by one. If we compile several files in a
 # row (i.e., in the same instance of Emacs) we can't make sure that
@@ -210,7 +222,11 @@ compile-onefile:
 # cannot have prerequisites.
 .el.elc:
        @echo Compiling $<
-       @$(emacs) $(BYTE_COMPILE_EXTRA_FLAGS) -f batch-byte-compile $<
+       @# The BIG_STACK_OPTS are only needed to byte-compile the byte-compiler
+       @# files, which is normally done in compile-first, but may also be
+       @# recompiled via this rule.
+       @$(emacs) $(BIG_STACK_OPTS) $(BYTE_COMPILE_EXTRA_FLAGS) \
+               -f batch-byte-compile $<
 
 .PHONY: compile-first compile-main compile compile-always