Mercurial > emacs
changeset 25941:aff7b4b37817
(bootstrap-compile): New target. Compile Lisp
files with ../src/temacs.
author | Gerd Moellmann <gerd@gnu.org> |
---|---|
date | Fri, 08 Oct 1999 23:24:28 +0000 |
parents | 3d7b096fb086 |
children | 0c5d04c620dd |
files | lisp/Makefile |
diffstat | 1 files changed, 36 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/Makefile Fri Oct 08 23:08:28 1999 +0000 +++ b/lisp/Makefile Fri Oct 08 23:24:28 1999 +0000 @@ -46,6 +46,10 @@ emacs = $(EMACS) $(EMACSOPT) +# The Emacs used to compile Lisp files from scratch. + +temacs=../src/temacs -batch -l ./loadup.el + doit: @@ -124,7 +128,7 @@ compile: doit wd=`pwd`; \ - find $$wd -name "*.elc" | xargs chmod +w; \ + find $$wd -name "*.elc" -print | xargs chmod +w; \ subdirs=`find $$wd -type d -print`; \ for dir in $$subdirs; do \ case $$dir in \ @@ -148,6 +152,37 @@ fi; \ done +# Compile Lisp files when all we have is the temacs in ../src. All +# .elc files under the current directory are deleted first to make +# sure we start from a clean basis. + +bootstrap-compile: doit + wd=`pwd`; \ + find $$wd -name "*.elc" -print | xargs rm -f \ + subdirs=`find $$wd -type d -print`; \ + for dir in $$subdirs; do \ + case $$dir in \ + */Old | */RCS | */CVS | */=* ) ;; \ + *) loadpath="$$loadpath \"$$dir\"" ;; \ + esac; \ + done; \ + loadpath="(setq load-path '($$loadpath))"; \ + dont_compile=`echo $(DONTCOMPILE)`; \ + for el in $(EL); do \ + compile_it=y; \ + for dont in $$dont_compile; do \ + if test $$el = $$dont; then \ + compile_it=n; \ + fi; \ + done; \ + if test $$compile_it = y; then \ + $(temacs) --eval "$$loadpath" -f batch-byte-compile $$el; \ + else \ + echo "Don't compile $$el"; \ + fi; \ + done + + # Recompile all Lisp files which are newer than their .elc files. # Note that this doesn't create .elc files. It only recompiles if an # .elc is present.