aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGerd Moellmann1999-10-07 23:29:39 +0000
committerGerd Moellmann1999-10-07 23:29:39 +0000
commit7ec641b84314543f7a141ccbce81849147ea2d83 (patch)
treefed5fac8b10a3307645429c7e90defb174b8e8dd
parent4e1d9c86dfe21e8ec7d841f583895636f059eec9 (diff)
downloademacs-7ec641b84314543f7a141ccbce81849147ea2d83.tar.gz
emacs-7ec641b84314543f7a141ccbce81849147ea2d83.zip
(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.
-rw-r--r--lisp/ChangeLog9
-rw-r--r--lisp/Makefile96
2 files changed, 98 insertions, 7 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index c36cab4752c..2697ca69ab9 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,12 @@
11999-10-08 Gerd Moellmann <gerd@gnu.org>
2
3 * Makefile (EMACSOPT, DONTCOMPILE, EL): New.
4 (emacs): Use it everywhere instead of EMACS.
5 (compile): New target. Compile all Lisp files from scratch.
6 (recompile): New target. Recompile lisp directory.
7 (autoloads-with-other-emacs): New target. Build loaddefs.el with
8 an Emacs executable not built in the current directory tree.
9
11999-10-07 Peter Breton <pbreton@ne.mediaone.net> 101999-10-07 Peter Breton <pbreton@ne.mediaone.net>
2 11
3 * filecache.el (file-cache-completion-ignore-case): New variable, 12 * filecache.el (file-cache-completion-ignore-case): New variable,
diff --git a/lisp/Makefile b/lisp/Makefile
index 684fe148ec8..838c1532552 100644
--- a/lisp/Makefile
+++ b/lisp/Makefile
@@ -1,12 +1,24 @@
1# 1#
2# Maintenance productions for the Lisp directory 2# Maintenance productions for the Lisp directory
3# 3#
4EMACS = emacs 4
5# You can specify a different executable on the make command line,
6# e.g. "make EMACS=../src/emacs ...".
7
8EMACS = emacs
9
10# Command line flags for Emacs. This must include --multibyte,
11# otherwise some files will not compile.
12
13EMACSOPT = --no-init-file --no-site-file --multibyte -batch
14
5SOURCES = *.el COPYING Makefile 15SOURCES = *.el COPYING Makefile
6lisptagsfiles1 = [a-zA-Z]*.el 16lisptagsfiles1 = [a-zA-Z]*.el
7lisptagsfiles2 = [a-zA-Z]*/[a-zA-Z]*.el 17lisptagsfiles2 = [a-zA-Z]*/[a-zA-Z]*.el
8ETAGS = ../lib-src/etags 18ETAGS = ../lib-src/etags
9 19
20# Leave this in. I don't know if some utility depends on it.
21
10dontcompilefiles: bindings.el blessmail.el bruce.el cus-load.el cus-start.el 22dontcompilefiles: bindings.el blessmail.el bruce.el cus-load.el cus-start.el
11dontcompilefiles: forms-d2.el forms-pass.el 23dontcompilefiles: forms-d2.el forms-pass.el
12dontcompilefiles: latin-1.el latin-2.el latin-3.el latin-4.el latin-5.el 24dontcompilefiles: latin-1.el latin-2.el latin-3.el latin-4.el latin-5.el
@@ -14,6 +26,27 @@ dontcompilefiles: loaddefs.el loadup.el mule-conf.el patcomp.el
14dontcompilefiles: paths.el sc.el subdirs.el term-nasty.el version.el 26dontcompilefiles: paths.el sc.el subdirs.el term-nasty.el version.el
15dontcompilefiles: generic-x.el latin-8.el latin-9.el 27dontcompilefiles: generic-x.el latin-8.el latin-9.el
16 28
29# Files which should not be compiled. All file names must be relative
30# to the `lisp' directory.
31
32DONTCOMPILE = bindings.el mail/blessmail.el play/bruce.el cus-load.el \
33 cus-start.el forms-d2.el forms-pass.el \
34 international/latin-1.el international/latin-2.el \
35 international/latin-3.el international/latin-4.el \
36 international/latin-5.el \
37 loaddefs.el loadup.el international/mule-conf.el patcomp.el \
38 paths.el mail/sc.el subdirs.el term-nasty.el version.el \
39 generic-x.el international/latin-8.el international/latin-9.el
40
41# All Lisp source files in the current directory.
42
43EL = $(lisptagsfiles1) $(lisptagsfiles2)
44
45# The actual Emacs command run in the targets below.
46
47emacs = $(EMACS) $(EMACSOPT)
48
49
17doit: 50doit:
18 51
19custom-deps: doit 52custom-deps: doit
@@ -24,7 +57,7 @@ custom-deps: doit
24 esac; \ 57 esac; \
25 done; \ 58 done; \
26 echo Directories: $$wins; \ 59 echo Directories: $$wins; \
27 $(EMACS) -batch -l cus-dep -f custom-make-dependencies $$wins 60 $(emacs) -l cus-dep -f custom-make-dependencies $$wins
28 61
29finder-data: doit 62finder-data: doit
30 subdirs=`find . -type d -print`; \ 63 subdirs=`find . -type d -print`; \
@@ -34,7 +67,7 @@ finder-data: doit
34 esac; \ 67 esac; \
35 done; \ 68 done; \
36 echo Directories: $$wins; \ 69 echo Directories: $$wins; \
37 $(EMACS) -batch -l finder -f finder-compile-keywords-make-dist $$wins 70 $(emacs) -l finder -f finder-compile-keywords-make-dist $$wins
38 71
39autoloads: doit 72autoloads: doit
40 subdirs=`find . -type d -print`; \ 73 subdirs=`find . -type d -print`; \
@@ -44,7 +77,7 @@ autoloads: doit
44 esac; \ 77 esac; \
45 done; \ 78 done; \
46 echo Directories: $$wins; \ 79 echo Directories: $$wins; \
47 $(EMACS) -batch -f batch-update-autoloads $$wins 80 $(emacs) -f batch-update-autoloads $$wins
48 81
49update-subdirs: doit 82update-subdirs: doit
50 subdirs=`find . -type d -print`; \ 83 subdirs=`find . -type d -print`; \
@@ -68,9 +101,9 @@ updates: doit
68 ../update-subdirs $$file; \ 101 ../update-subdirs $$file; \
69 done; \ 102 done; \
70 echo Directories: $$wins; \ 103 echo Directories: $$wins; \
71 $(EMACS) -batch -l cus-dep -f custom-make-dependencies $$wins; \ 104 $(emacs) -l cus-dep -f custom-make-dependencies $$wins; \
72 $(EMACS) -batch -l finder -f finder-compile-keywords-make-dist $$wins; \ 105 $(emacs) -l finder -f finder-compile-keywords-make-dist $$wins; \
73 $(EMACS) -batch -f batch-update-autoloads $$wins 106 $(emacs) -f batch-update-autoloads $$wins
74 107
75TAGS: $(lisptagsfiles1) $(lisptagsfiles2) 108TAGS: $(lisptagsfiles1) $(lisptagsfiles2)
76 ${ETAGS} $(lisptagsfiles1) $(lisptagsfiles2) 109 ${ETAGS} $(lisptagsfiles1) $(lisptagsfiles2)
@@ -78,3 +111,52 @@ TAGS: $(lisptagsfiles1) $(lisptagsfiles2)
78TAGS-LISP: $(lispsource)$(lisptagsfiles1) $(lispsource)$(lisptagsfiles2) 111TAGS-LISP: $(lispsource)$(lisptagsfiles1) $(lispsource)$(lisptagsfiles2)
79 ${ETAGS} -o TAGS-LISP \ 112 ${ETAGS} -o TAGS-LISP \
80 $(lispsource)$(lisptagsfiles1) $(lispsource)$(lisptagsfiles2) 113 $(lispsource)$(lisptagsfiles1) $(lispsource)$(lisptagsfiles2)
114
115# Compile all Lisp files, except those from DONTCOMPILE. This
116# compiles files unconditionally. All .elc files are made writable
117# before compilation in case we checked out read-only (CVS option -r).
118
119compile: doit
120 dont_compile=`echo $(DONTCOMPILE)`; \
121 for el in $(EL); do \
122 compile_it=y; \
123 for dont in $$dont_compile; do \
124 if test $$el = $$dont; then \
125 compile_it=n; \
126 fi; \
127 done; \
128 if test $$compile_it = y; then \
129 els="$$el $$els"; \
130 echo "Compile $$el"; \
131 else \
132 echo "Don't compile $$el"; \
133 fi; \
134 done; \
135 chmod +w $$els; \
136 $(emacs) -f batch-byte-compile $$els;
137
138# Recompile all Lisp files which are newer than their .elc files.
139# Note that this doesn't create .elc files. It only recompiles if an
140# .elc is present.
141
142recompile: doit
143 $(emacs) -f batch-byte-recompile-directory .
144
145# Build loaddefs.el but with an Emacs executable which was not built
146# in the current directory tree. The problem in this case is that
147# autoload.el reads and writes loaddefs.el in its `source-directory'.
148# If that's different from the current directory tree, we can't build
149# loaddefs.el.
150
151autoloads-with-other-emacs: doit
152 subdirs=`find . -type d -print`; \
153 for file in $$subdirs; do \
154 case $$file in */Old | */RCS | */CVS | */=* ) ;; \
155 *) wins="$$wins $$file" ;; \
156 esac; \
157 done; \
158 echo Directories: $$wins; \
159 $(emacs) --eval '(setq source-directory ".")' \
160 -f batch-update-autoloads $$wins
161
162# Makefile ends here.