]> code.delx.au - gnu-emacs/blobdiff - lisp/Makefile.in
There's no reason not to compile version.el
[gnu-emacs] / lisp / Makefile.in
index acc073650dbc3cc8e09cd27366117e54925e12ca..29ef8e40abeb27d95d3d6bef0174c415b8856a09 100644 (file)
@@ -1,6 +1,5 @@
 # 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-2012 Free Software Foundation, Inc.
 
 # This file is part of GNU Emacs.
 
@@ -35,7 +34,7 @@ EMACS = ${abs_top_builddir}/src/emacs
 
 # Command line flags for Emacs.
 
-EMACSOPT = -batch --no-site-file
+EMACSOPT = -batch --no-site-file --no-site-lisp
 
 # Extra flags to pass to the byte compiler
 BYTE_COMPILE_EXTRA_FLAGS =
@@ -71,19 +70,35 @@ AUTOGENEL = loaddefs.el \
        cedet/ede/loaddefs.el \
        cedet/srecode/loaddefs.el
 
+# Versioned files that are the value of someone's `generated-autoload-file'.
+# Note that update_loaddefs parses this.
+AUTOGEN_VCS = \
+       ps-print.el \
+       emulation/tpu-edt.el \
+       emacs-lisp/cl-loaddefs.el \
+       mail/rmail.el \
+       dired.el \
+       ibuffer.el \
+       htmlfontify.el \
+       emacs-lisp/eieio.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 = 1000
+BIG_STACK_DEPTH = 1200
 BIG_STACK_OPTS = --eval "(setq max-lisp-eval-depth $(BIG_STACK_DEPTH))"
 
+BYTE_COMPILE_FLAGS = $(BIG_STACK_OPTS) $(BYTE_COMPILE_EXTRA_FLAGS)
+
 # 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/macroexp.elc \
+       $(lisp)/emacs-lisp/cconv.elc \
        $(lisp)/emacs-lisp/autoload.elc
 
 # The actual Emacs command run in the targets below.
@@ -91,7 +106,7 @@ COMPILE_FIRST = \
 emacs = EMACSLOADPATH=$(lisp) LC_ALL=C $(EMACS) $(EMACSOPT)
 
 # Common command to find subdirectories
-setwins=subdirs=`(find . -type d -print)`; \
+setwins=subdirs=`find . -type d -print`; \
        for file in $$subdirs; do \
           case $$file in */.* | */.*/* | */=* ) ;; \
                *) wins="$$wins $$file" ;; \
@@ -99,7 +114,7 @@ setwins=subdirs=`(find . -type d -print)`; \
         done
 
 # Find all subdirectories except `obsolete' and `term'.
-setwins_almost=subdirs=`(find . -type d -print)`; \
+setwins_almost=subdirs=`find . -type d -print`; \
        for file in $$subdirs; do \
           case $$file in */.* | */.*/* | */=* | */obsolete | */term ) ;; \
                *) wins="$$wins $$file" ;; \
@@ -107,7 +122,7 @@ setwins_almost=subdirs=`(find . -type d -print)`; \
         done
 
 # Find all subdirectories in which we might want to create subdirs.el
-setwins_for_subdirs=subdirs=`(find . -type d -print)`; \
+setwins_for_subdirs=subdirs=`find . -type d -print`; \
        for file in $$subdirs; do \
           case $$file in */.* | */.*/* | */=* | */cedet* ) ;; \
                *) wins="$$wins $$file" ;; \
@@ -150,12 +165,9 @@ finder-data: doit
        echo Directories: $$wins; \
        $(emacs) -l finder --eval '(setq generated-finder-keywords-file "$(lisp)/finder-inf.el")' -f finder-compile-keywords-make-dist $$wins
 
-# The chmod +w is to handle env var CVSREAD=1.  Files named
-# are identified by being the value of `generated-autoload-file'.
+# The chmod +w is to handle env var CVSREAD=1.
 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
+       cd $(lisp) && chmod +w $(AUTOGEN_VCS)
        cd $(lisp); $(setwins_almost); \
        echo Directories: $$wins; \
        $(emacs) -l autoload --eval '(setq generated-autoload-file "$(lisp)/loaddefs.el")' -f batch-update-autoloads $$wins
@@ -167,7 +179,7 @@ $(lisp)/subdirs.el:
 update-subdirs: doit
        cd $(lisp); $(setwins_for_subdirs); \
        for file in $$wins; do \
-          $(top_srcdir)/update-subdirs $$file; \
+          $(top_srcdir)/build-aux/update-subdirs $$file; \
        done;
 
 updates: update-subdirs autoloads finder-data custom-deps
@@ -202,8 +214,8 @@ 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.el -f byte-compile-refresh-preloaded \
-               $(BIG_STACK_OPTS) $(BYTE_COMPILE_EXTRA_FLAGS) \
+       @$(emacs) $(BYTE_COMPILE_FLAGS) \
+               -l bytecomp -f byte-compile-refresh-preloaded \
                -f batch-byte-compile $(THEFILE)
 
 # Files MUST be compiled one by one. If we compile several files in a
@@ -219,7 +231,10 @@ compile-onefile:
 # cannot have prerequisites.
 .el.elc:
        @echo Compiling $<
-       @$(emacs) $(BIG_STACK_OPTS) $(BYTE_COMPILE_EXTRA_FLAGS) \
+       @# 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) $(BYTE_COMPILE_FLAGS) \
                -f batch-byte-compile $<
 
 .PHONY: compile-first compile-main compile compile-always
@@ -259,7 +274,7 @@ compile-main: compile-clean
 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"; \
@@ -285,7 +300,7 @@ compile-always: doit
 compile-calc:
        for el in $(lisp)/calc/*.el; do \
          echo Compiling $$el; \
-         $(emacs) $(BYTE_COMPILE_EXTRA_FLAGS) -f batch-byte-compile $$el || exit 1; \
+         $(emacs) $(BYTE_COMPILE_FLAGS) -f batch-byte-compile $$el || exit 1;\
        done
 
 # Backup compiled Lisp files in elc.tar.gz.  If that file already
@@ -312,7 +327,8 @@ compile-after-backup: backup-compiled-files compile-always
 # since the environment of later files is affected by definitions in
 # earlier ones.
 recompile: doit $(LOADDEFS) compile-first $(lisp)/progmodes/cc-mode.elc
-       $(emacs) --eval "(batch-byte-recompile-directory 0)" $(lisp)
+       $(emacs) $(BYTE_COMPILE_FLAGS) \
+           --eval "(batch-byte-recompile-directory 0)" $(lisp)
 
 # Update MH-E internal autoloads. These are not to be confused with
 # the autoloads for the MH-E entry points, which are already in loaddefs.el.
@@ -340,16 +356,16 @@ $(MH_E_DIR)/mh-loaddefs.el: $(MH_E_SRC)
           --eval "(setq make-backup-files nil)" \
           -f batch-update-autoloads $(MH_E_DIR)
 
-# Update TRAMP internal autoloads. Maybe we could move trmp*.el into
+# 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-imap.el   \
-       $(TRAMP_DIR)/tramp-sh.el   $(TRAMP_DIR)/tramp-smb.el    \
-       $(TRAMP_DIR)/tramp-uu.el   $(TRAMP_DIR)/trampver.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 \