Mercurial > emacs
changeset 25917:663097d932a4
(EMACSOPT, DONTCOMPILE, EL): New.
(emacs): Use it everywhere instead of EMACS.
(compile): New target. Compile all Lisp files from scratch.
(recompile): New target. Recompile lisp directory.
(autoloads-with-other-emacs): New target. Build loaddefs.el with
an Emacs executable not built in the current directory tree.
author | Gerd Moellmann <gerd@gnu.org> |
---|---|
date | Thu, 07 Oct 1999 23:29:03 +0000 |
parents | 91df9794fab8 |
children | edf686e96b86 |
files | lisp/Makefile |
diffstat | 1 files changed, 89 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/Makefile Thu Oct 07 21:24:13 1999 +0000 +++ b/lisp/Makefile Thu Oct 07 23:29:03 1999 +0000 @@ -1,12 +1,24 @@ # # Maintenance productions for the Lisp directory # -EMACS = emacs + +# You can specify a different executable on the make command line, +# e.g. "make EMACS=../src/emacs ...". + +EMACS = emacs + +# Command line flags for Emacs. This must include --multibyte, +# otherwise some files will not compile. + +EMACSOPT = --no-init-file --no-site-file --multibyte -batch + SOURCES = *.el COPYING Makefile lisptagsfiles1 = [a-zA-Z]*.el lisptagsfiles2 = [a-zA-Z]*/[a-zA-Z]*.el ETAGS = ../lib-src/etags +# Leave this in. I don't know if some utility depends on it. + dontcompilefiles: bindings.el blessmail.el bruce.el cus-load.el cus-start.el dontcompilefiles: forms-d2.el forms-pass.el dontcompilefiles: latin-1.el latin-2.el latin-3.el latin-4.el latin-5.el @@ -14,6 +26,27 @@ dontcompilefiles: paths.el sc.el subdirs.el term-nasty.el version.el dontcompilefiles: generic-x.el latin-8.el latin-9.el +# Files which should not be compiled. All file names must be relative +# to the `lisp' directory. + +DONTCOMPILE = bindings.el mail/blessmail.el play/bruce.el cus-load.el \ + cus-start.el forms-d2.el forms-pass.el \ + international/latin-1.el international/latin-2.el \ + international/latin-3.el international/latin-4.el \ + international/latin-5.el \ + loaddefs.el loadup.el international/mule-conf.el patcomp.el \ + paths.el mail/sc.el subdirs.el term-nasty.el version.el \ + generic-x.el international/latin-8.el international/latin-9.el + +# All Lisp source files in the current directory. + +EL = $(lisptagsfiles1) $(lisptagsfiles2) + +# The actual Emacs command run in the targets below. + +emacs = $(EMACS) $(EMACSOPT) + + doit: custom-deps: doit @@ -24,7 +57,7 @@ esac; \ done; \ echo Directories: $$wins; \ - $(EMACS) -batch -l cus-dep -f custom-make-dependencies $$wins + $(emacs) -l cus-dep -f custom-make-dependencies $$wins finder-data: doit subdirs=`find . -type d -print`; \ @@ -34,7 +67,7 @@ esac; \ done; \ echo Directories: $$wins; \ - $(EMACS) -batch -l finder -f finder-compile-keywords-make-dist $$wins + $(emacs) -l finder -f finder-compile-keywords-make-dist $$wins autoloads: doit subdirs=`find . -type d -print`; \ @@ -44,7 +77,7 @@ esac; \ done; \ echo Directories: $$wins; \ - $(EMACS) -batch -f batch-update-autoloads $$wins + $(emacs) -f batch-update-autoloads $$wins update-subdirs: doit subdirs=`find . -type d -print`; \ @@ -68,9 +101,9 @@ ../update-subdirs $$file; \ done; \ echo Directories: $$wins; \ - $(EMACS) -batch -l cus-dep -f custom-make-dependencies $$wins; \ - $(EMACS) -batch -l finder -f finder-compile-keywords-make-dist $$wins; \ - $(EMACS) -batch -f batch-update-autoloads $$wins + $(emacs) -l cus-dep -f custom-make-dependencies $$wins; \ + $(emacs) -l finder -f finder-compile-keywords-make-dist $$wins; \ + $(emacs) -f batch-update-autoloads $$wins TAGS: $(lisptagsfiles1) $(lisptagsfiles2) ${ETAGS} $(lisptagsfiles1) $(lisptagsfiles2) @@ -78,3 +111,52 @@ TAGS-LISP: $(lispsource)$(lisptagsfiles1) $(lispsource)$(lisptagsfiles2) ${ETAGS} -o TAGS-LISP \ $(lispsource)$(lisptagsfiles1) $(lispsource)$(lisptagsfiles2) + +# Compile all Lisp files, except those from DONTCOMPILE. This +# compiles files unconditionally. All .elc files are made writable +# before compilation in case we checked out read-only (CVS option -r). + +compile: doit + 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 \ + els="$$el $$els"; \ + echo "Compile $$el"; \ + else \ + echo "Don't compile $$el"; \ + fi; \ + done; \ + chmod +w $$els; \ + $(emacs) -f batch-byte-compile $$els; + +# 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. + +recompile: doit + $(emacs) -f batch-byte-recompile-directory . + +# Build loaddefs.el but with an Emacs executable which was not built +# in the current directory tree. The problem in this case is that +# autoload.el reads and writes loaddefs.el in its `source-directory'. +# If that's different from the current directory tree, we can't build +# loaddefs.el. + +autoloads-with-other-emacs: doit + subdirs=`find . -type d -print`; \ + for file in $$subdirs; do \ + case $$file in */Old | */RCS | */CVS | */=* ) ;; \ + *) wins="$$wins $$file" ;; \ + esac; \ + done; \ + echo Directories: $$wins; \ + $(emacs) --eval '(setq source-directory ".")' \ + -f batch-update-autoloads $$wins + +# Makefile ends here.