From 96ff0f098f805d5b99820d841ff459a55b5068ff Mon Sep 17 00:00:00 2001 From: Gerd Moellmann Date: Fri, 8 Oct 1999 23:25:05 +0000 Subject: [PATCH] (bootstrap-compile): New target. Compile Lisp files with ../src/temacs. --- lisp/ChangeLog | 5 +++++ lisp/Makefile | 37 ++++++++++++++++++++++++++++++++++++- 2 files changed, 41 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 412edf885d8..bc4949088c4 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +1999-10-09 Gerd Moellmann + + * Makefile (bootstrap-compile): New target. Compile Lisp + files with ../src/temacs. + 1999-10-08 Simon Marshall * emacs-lisp/regexp-opt.el (regexp-opt-try-suffix): New function. diff --git a/lisp/Makefile b/lisp/Makefile index 3e10f639d23..23b7bee8a5a 100644 --- a/lisp/Makefile +++ b/lisp/Makefile @@ -46,6 +46,10 @@ EL = $(lisptagsfiles1) $(lisptagsfiles2) emacs = $(EMACS) $(EMACSOPT) +# The Emacs used to compile Lisp files from scratch. + +temacs=../src/temacs -batch -l ./loadup.el + doit: @@ -124,7 +128,7 @@ TAGS-LISP: $(lispsource)$(lisptagsfiles1) $(lispsource)$(lisptagsfiles2) 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 @@ compile: doit 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. -- 2.39.5