comparison lisp/Makefile @ 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 08bf4a1b174f
children 3223912646d8
comparison
equal deleted inserted replaced
25916:91df9794fab8 25917:663097d932a4
1 # 1 #
2 # Maintenance productions for the Lisp directory 2 # Maintenance productions for the Lisp directory
3 # 3 #
4 EMACS = emacs 4
5 # You can specify a different executable on the make command line,
6 # e.g. "make EMACS=../src/emacs ...".
7
8 EMACS = emacs
9
10 # Command line flags for Emacs. This must include --multibyte,
11 # otherwise some files will not compile.
12
13 EMACSOPT = --no-init-file --no-site-file --multibyte -batch
14
5 SOURCES = *.el COPYING Makefile 15 SOURCES = *.el COPYING Makefile
6 lisptagsfiles1 = [a-zA-Z]*.el 16 lisptagsfiles1 = [a-zA-Z]*.el
7 lisptagsfiles2 = [a-zA-Z]*/[a-zA-Z]*.el 17 lisptagsfiles2 = [a-zA-Z]*/[a-zA-Z]*.el
8 ETAGS = ../lib-src/etags 18 ETAGS = ../lib-src/etags
19
20 # Leave this in. I don't know if some utility depends on it.
9 21
10 dontcompilefiles: bindings.el blessmail.el bruce.el cus-load.el cus-start.el 22 dontcompilefiles: bindings.el blessmail.el bruce.el cus-load.el cus-start.el
11 dontcompilefiles: forms-d2.el forms-pass.el 23 dontcompilefiles: forms-d2.el forms-pass.el
12 dontcompilefiles: latin-1.el latin-2.el latin-3.el latin-4.el latin-5.el 24 dontcompilefiles: latin-1.el latin-2.el latin-3.el latin-4.el latin-5.el
13 dontcompilefiles: loaddefs.el loadup.el mule-conf.el patcomp.el 25 dontcompilefiles: loaddefs.el loadup.el mule-conf.el patcomp.el
14 dontcompilefiles: paths.el sc.el subdirs.el term-nasty.el version.el 26 dontcompilefiles: paths.el sc.el subdirs.el term-nasty.el version.el
15 dontcompilefiles: generic-x.el latin-8.el latin-9.el 27 dontcompilefiles: generic-x.el latin-8.el latin-9.el
28
29 # Files which should not be compiled. All file names must be relative
30 # to the `lisp' directory.
31
32 DONTCOMPILE = 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
43 EL = $(lisptagsfiles1) $(lisptagsfiles2)
44
45 # The actual Emacs command run in the targets below.
46
47 emacs = $(EMACS) $(EMACSOPT)
48
16 49
17 doit: 50 doit:
18 51
19 custom-deps: doit 52 custom-deps: doit
20 subdirs=`find . -type d -print`; \ 53 subdirs=`find . -type d -print`; \
22 case $$file in */Old | */RCS | */CVS | */=* ) ;; \ 55 case $$file in */Old | */RCS | */CVS | */=* ) ;; \
23 *) wins="$$wins $$file" ;; \ 56 *) wins="$$wins $$file" ;; \
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
29 finder-data: doit 62 finder-data: doit
30 subdirs=`find . -type d -print`; \ 63 subdirs=`find . -type d -print`; \
31 for file in $$subdirs; do \ 64 for file in $$subdirs; do \
32 case $$file in */Old | */RCS | */CVS | */=* ) ;; \ 65 case $$file in */Old | */RCS | */CVS | */=* ) ;; \
33 *) wins="$$wins $$file" ;; \ 66 *) wins="$$wins $$file" ;; \
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
39 autoloads: doit 72 autoloads: doit
40 subdirs=`find . -type d -print`; \ 73 subdirs=`find . -type d -print`; \
41 for file in $$subdirs; do \ 74 for file in $$subdirs; do \
42 case $$file in */Old | */RCS | */CVS | */=* ) ;; \ 75 case $$file in */Old | */RCS | */CVS | */=* ) ;; \
43 *) wins="$$wins $$file" ;; \ 76 *) wins="$$wins $$file" ;; \
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
49 update-subdirs: doit 82 update-subdirs: doit
50 subdirs=`find . -type d -print`; \ 83 subdirs=`find . -type d -print`; \
51 for file in $$subdirs; do \ 84 for file in $$subdirs; do \
52 case $$file in */Old | */RCS | */CVS | */=* ) ;; \ 85 case $$file in */Old | */RCS | */CVS | */=* ) ;; \
66 done; \ 99 done; \
67 for file in $$wins; do \ 100 for file in $$wins; do \
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
75 TAGS: $(lisptagsfiles1) $(lisptagsfiles2) 108 TAGS: $(lisptagsfiles1) $(lisptagsfiles2)
76 ${ETAGS} $(lisptagsfiles1) $(lisptagsfiles2) 109 ${ETAGS} $(lisptagsfiles1) $(lisptagsfiles2)
77 110
78 TAGS-LISP: $(lispsource)$(lisptagsfiles1) $(lispsource)$(lisptagsfiles2) 111 TAGS-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
119 compile: 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
142 recompile: 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
151 autoloads-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.