# Maintenance productions for the Lisp directory
-# Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
-# 2009, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2000-2011 Free Software Foundation, Inc.
# This file is part of GNU Emacs.
# to use an absolute file name.
EMACS = ${abs_top_builddir}/src/emacs
-# Command line flags for Emacs. This must include --multibyte,
-# otherwise some files will not compile.
+# Command line flags for Emacs.
-EMACSOPT = -batch --no-site-file --multibyte
+EMACSOPT = -batch --no-site-file --no-site-lisp
# Extra flags to pass to the byte compiler
BYTE_COMPILE_EXTRA_FLAGS =
LOADDEFS = $(lisp)/calendar/cal-loaddefs.el \
$(lisp)/calendar/diary-loaddefs.el \
$(lisp)/calendar/hol-loaddefs.el \
- $(lisp)/mh-e/mh-loaddefs.el
+ $(lisp)/mh-e/mh-loaddefs.el \
+ $(lisp)/net/tramp-loaddefs.el
# Elisp files auto-generated.
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.
emacs = EMACSLOADPATH=$(lisp) LC_ALL=C $(EMACS) $(EMACSOPT)
# Common command to find subdirectories
-
setwins=subdirs=`(find . -type d -print)`; \
for file in $$subdirs; do \
- case $$file in */Old | */RCS | */CVS | */CVS/* | */.* | */.*/* | */=* ) ;; \
+ case $$file in */.* | */.*/* | */=* ) ;; \
*) wins="$$wins $$file" ;; \
esac; \
done
# Find all subdirectories except `obsolete' and `term'.
-
setwins_almost=subdirs=`(find . -type d -print)`; \
for file in $$subdirs; do \
- case $$file in */Old | */RCS | */CVS | */CVS/* | */.* | */.*/* | */=* | */obsolete | */term ) ;; \
+ case $$file in */.* | */.*/* | */=* | */obsolete | */term ) ;; \
*) wins="$$wins $$file" ;; \
esac; \
done
# Find all subdirectories in which we might want to create subdirs.el
-
setwins_for_subdirs=subdirs=`(find . -type d -print)`; \
for file in $$subdirs; do \
- case $$file in */Old | */RCS | */CVS | */CVS/* | */.* | */.*/* | */=* | */cedet* ) ;; \
+ case $$file in */.* | */.*/* | */=* | */cedet* ) ;; \
*) wins="$$wins $$file" ;; \
esac; \
done
autoloads: $(LOADDEFS) doit
chmod +w $(lisp)/ps-print.el $(lisp)/emulation/tpu-edt.el \
$(lisp)/emacs-lisp/cl-loaddefs.el $(lisp)/mail/rmail.el \
- $(lisp)/dired.el $(lisp)/ibuffer.el $(lisp)/htmlfontify.el
+ $(lisp)/dired.el $(lisp)/ibuffer.el $(lisp)/htmlfontify.el \
+ $(lisp)/emacs-lisp/eieio.el
cd $(lisp); $(setwins_almost); \
echo Directories: $$wins; \
$(emacs) -l autoload --eval '(setq generated-autoload-file "$(lisp)/loaddefs.el")' -f batch-update-autoloads $$wins
@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
# 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
compile-clean:
@cd $(lisp); $(setwins); \
elcs=`echo "$$wins " | sed -e 's|/\./|/|g' -e 's|/\. | |g' -e 's| |/*.elc |g'`; \
- for el in $$(echo $$elcs | sed -e 's/\.elc/\.el/g'); do \
+ for el in `echo $$elcs | sed -e 's/\.elc/\.el/g'`; do \
if test -f "$$el" -o \! -f "$${el}c"; then :; else \
echo rm "$${el}c"; \
rm "$${el}c"; \
--eval "(setq make-backup-files nil)" \
-f batch-update-autoloads $(MH_E_DIR)
+# Update TRAMP internal autoloads. Maybe we could move tramp*.el into
+# an own subdirectory. OTOH, it does not hurt to keep them in
+# lisp/net.
+TRAMP_DIR = $(lisp)/net
+TRAMP_SRC = $(TRAMP_DIR)/tramp.el $(TRAMP_DIR)/tramp-cache.el \
+ $(TRAMP_DIR)/tramp-cmds.el $(TRAMP_DIR)/tramp-compat.el \
+ $(TRAMP_DIR)/tramp-ftp.el $(TRAMP_DIR)/tramp-gvfs.el \
+ $(TRAMP_DIR)/tramp-gw.el $(TRAMP_DIR)/tramp-sh.el \
+ $(TRAMP_DIR)/tramp-smb.el $(TRAMP_DIR)/tramp-uu.el \
+ $(TRAMP_DIR)/trampver.el
+
+$(TRAMP_DIR)/tramp-loaddefs.el: $(TRAMP_SRC)
+ $(emacs) -l autoload \
+ --eval "(setq generate-autoload-cookie \";;;###tramp-autoload\")" \
+ --eval "(setq generated-autoload-file \"$@\")" \
+ --eval "(setq make-backup-files nil)" \
+ -f batch-update-autoloads $(TRAMP_DIR)
+
CAL_DIR = $(lisp)/calendar
## Those files that may contain internal calendar autoload cookies.
## Avoids circular dependency warning for *-loaddefs.el.