2 |
# Copyright (c) 2000-2001 Free Software Foundation, Inc. |
# Copyright (c) 2000-2001 Free Software Foundation, Inc. |
3 |
# |
# |
4 |
# This file is part of GNU Emacs. |
# This file is part of GNU Emacs. |
5 |
# |
# |
6 |
# GNU Emacs is free software; you can redistribute it and/or modify |
# GNU Emacs is free software; you can redistribute it and/or modify |
7 |
# it under the terms of the GNU General Public License as published by |
# it under the terms of the GNU General Public License as published by |
8 |
# the Free Software Foundation; either version 2, or (at your option) |
# the Free Software Foundation; either version 2, or (at your option) |
9 |
# any later version. |
# any later version. |
10 |
# |
# |
11 |
# GNU Emacs is distributed in the hope that it will be useful, |
# GNU Emacs is distributed in the hope that it will be useful, |
12 |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
13 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
14 |
# GNU General Public License for more details. |
# GNU General Public License for more details. |
15 |
# |
# |
16 |
# You should have received a copy of the GNU General Public License |
# You should have received a copy of the GNU General Public License |
17 |
# along with GNU Emacs; see the file COPYING. If not, write to the |
# along with GNU Emacs; see the file COPYING. If not, write to the |
18 |
# Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
# Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
27 |
# ' |
# ' |
28 |
|
|
29 |
lisp = $(CURDIR) |
lisp = $(CURDIR) |
30 |
|
srcdir = $(CURDIR)/.. |
31 |
|
|
32 |
# You can specify a different executable on the make command line, |
# You can specify a different executable on the make command line, |
33 |
# e.g. "make EMACS=../src/emacs ...". |
# e.g. "make EMACS=../src/emacs ...". |
46 |
lisptagsfiles2 = $(lisp)/*/*.el |
lisptagsfiles2 = $(lisp)/*/*.el |
47 |
ETAGS = "../lib-src/$(BLD)/etags" |
ETAGS = "../lib-src/$(BLD)/etags" |
48 |
|
|
49 |
# Files which should not be compiled. |
# Files which should not be compiled. If you change the name `DONTCOMPILE' |
50 |
|
# to something different, you'll have to change make-dist as well, and |
51 |
|
# modify the lists in $lisp and $shortlisp on src/Makefile.in. |
52 |
|
# |
53 |
# - emacs-lisp/cl-specs.el: only contains `def-edebug-spec's so there's |
# - emacs-lisp/cl-specs.el: only contains `def-edebug-spec's so there's |
54 |
# no point compiling it, although it doesn't hurt. |
# no point compiling it, although it doesn't hurt. |
55 |
|
|
56 |
DONTCOMPILE = \ |
DONTCOMPILE = \ |
57 |
$(lisp)/cus-load.el \ |
$(lisp)/cus-load.el \ |
|
$(lisp)/cus-start.el \ |
|
58 |
$(lisp)/emacs-lisp/cl-specs.el \ |
$(lisp)/emacs-lisp/cl-specs.el \ |
59 |
$(lisp)/eshell/esh-maint.el \ |
$(lisp)/eshell/esh-maint.el \ |
60 |
$(lisp)/eshell/esh-groups.el \ |
$(lisp)/eshell/esh-groups.el \ |
70 |
$(lisp)/international/latin-8.el \ |
$(lisp)/international/latin-8.el \ |
71 |
$(lisp)/international/latin-9.el \ |
$(lisp)/international/latin-9.el \ |
72 |
$(lisp)/international/mule-conf.el \ |
$(lisp)/international/mule-conf.el \ |
73 |
|
$(lisp)/language/czech.el \ |
74 |
|
$(lisp)/language/devanagari.el \ |
75 |
|
$(lisp)/language/malayalam.el \ |
76 |
|
$(lisp)/language/tamil.el \ |
77 |
|
$(lisp)/language/english.el \ |
78 |
|
$(lisp)/language/greek.el \ |
79 |
|
$(lisp)/language/hebrew.el \ |
80 |
|
$(lisp)/language/japanese.el \ |
81 |
|
$(lisp)/language/korean.el \ |
82 |
|
$(lisp)/language/lao.el \ |
83 |
|
$(lisp)/language/misc-lang.el \ |
84 |
|
$(lisp)/language/romanian.el \ |
85 |
|
$(lisp)/language/slovak.el \ |
86 |
|
$(lisp)/language/thai.el \ |
87 |
|
$(lisp)/language/utf-8-lang.el \ |
88 |
|
$(lisp)/language/georgian.el \ |
89 |
$(lisp)/loaddefs.el \ |
$(lisp)/loaddefs.el \ |
90 |
$(lisp)/loadup.el \ |
$(lisp)/loadup.el \ |
91 |
$(lisp)/mail/blessmail.el \ |
$(lisp)/mail/blessmail.el \ |
113 |
$(lisp)/term/vt400.el \ |
$(lisp)/term/vt400.el \ |
114 |
$(lisp)/term/vt420.el \ |
$(lisp)/term/vt420.el \ |
115 |
$(lisp)/term/wyse50.el \ |
$(lisp)/term/wyse50.el \ |
|
$(lisp)/term/xterm.el \ |
|
116 |
$(lisp)/version.el |
$(lisp)/version.el |
117 |
|
|
118 |
# Files to compile before others during a bootstrap. This is done to |
# Files to compile before others during a bootstrap. This is done to |
143 |
|
|
144 |
# Have to define the list of subdirs manually when not using sh. |
# Have to define the list of subdirs manually when not using sh. |
145 |
WINS=\ |
WINS=\ |
146 |
|
calc \ |
147 |
calendar \ |
calendar \ |
148 |
emacs-lisp \ |
emacs-lisp \ |
149 |
emulation \ |
emulation \ |
152 |
international \ |
international \ |
153 |
language \ |
language \ |
154 |
mail \ |
mail \ |
155 |
|
mh-e \ |
156 |
net \ |
net \ |
157 |
|
obsolete \ |
158 |
play \ |
play \ |
159 |
progmodes \ |
progmodes \ |
160 |
term \ |
term \ |
169 |
@echo Directories: $(WINS) |
@echo Directories: $(WINS) |
170 |
-$(emacs) -l cus-dep --eval $(ARGQUOTE)(setq find-file-hooks nil)$(ARGQUOTE) -f custom-make-dependencies $(lisp) $(WINS) |
-$(emacs) -l cus-dep --eval $(ARGQUOTE)(setq find-file-hooks nil)$(ARGQUOTE) -f custom-make-dependencies $(lisp) $(WINS) |
171 |
|
|
172 |
finder-inf.el: |
finder-data: doit |
|
echo (provide $(SQUOTE)finder-inf)>> $@ |
|
|
|
|
|
finder-data: finder-inf.el doit |
|
173 |
@echo Directories: $(WINS) |
@echo Directories: $(WINS) |
174 |
$(emacs) -l finder -f finder-compile-keywords-make-dist $(lisp) $(WINS) |
$(emacs) -l finder -f finder-compile-keywords-make-dist $(lisp) $(WINS) |
175 |
|
|
176 |
loaddefs.el: |
loaddefs.el: |
177 |
|
$(MAKE) $(MFLAGS) loaddefs.el-$(SHELLTYPE) |
178 |
|
cp loaddefs.el-$(SHELLTYPE) $@ |
179 |
|
rm loaddefs.el-$(SHELLTYPE) |
180 |
|
|
181 |
|
loaddefs.el-SH: |
182 |
|
echo ";;; loaddefs.el --- automatically extracted autoloads" > $@ |
183 |
|
echo ";;" >> $@; echo ";;; Code:" >> $@ |
184 |
|
echo "(autoload 'define-minor-mode \"easy-mmode\")" >>$@ |
185 |
|
echo "(autoload 'define-ccl-program \"ccl\")" >>$@ |
186 |
|
echo "(autoload 'regexp-opt \"regexp-opt\")" >>$@ |
187 |
|
echo "(autoload 'string-to-list \"mule-util\")" >>$@ |
188 |
|
echo "(autoload 'define-derived-mode \"derived\")" >>$@ |
189 |
|
echo "(autoload 'encoded-kbd-mode \"encoded-kb\")" >>$@ |
190 |
|
echo "(defvar cvs-global-menu nil)" >>$@ |
191 |
|
echo "" >> $@ |
192 |
|
echo ";;; Local Variables:" >> $@ |
193 |
|
echo ";;; version-control: never" >> $@ |
194 |
|
echo ";;; no-byte-compile: t" >> $@ |
195 |
|
echo ";;; no-update-autoloads: t" >> $@ |
196 |
|
echo ";;; End:" >> $@ |
197 |
|
echo ";;; loaddefs.el ends here" >> $@ |
198 |
|
|
199 |
|
loaddefs.el-CMD: |
200 |
echo ;;; loaddefs.el --- automatically extracted autoloads> $@ |
echo ;;; loaddefs.el --- automatically extracted autoloads> $@ |
201 |
echo ;;; Code:>> $@ |
echo ;;; Code:>> $@ |
202 |
echo >> $@ |
echo (autoload 'define-minor-mode "easy-mmode")>> $@ |
203 |
|
echo (autoload 'define-ccl-program "ccl")>> $@ |
204 |
|
echo (autoload 'regexp-opt "regexp-opt")>> $@ |
205 |
|
echo (autoload 'string-to-list "mule-util")>> $@ |
206 |
|
echo (autoload 'define-derived-mode "derived")>> $@ |
207 |
|
echo (autoload 'encoded-kbd-mode "encoded-kb")>> $@ |
208 |
|
echo (defvar cvs-global-menu nil)>> $@ |
209 |
|
echo.>> $@ |
210 |
echo ;;; Local Variables:>> $@ |
echo ;;; Local Variables:>> $@ |
211 |
echo ;;; version-control: never>> $@ |
echo ;;; version-control: never>> $@ |
212 |
echo ;;; no-byte-compile: t>> $@ |
echo ;;; no-byte-compile: t>> $@ |
230 |
update-subdirs: update-subdirs-$(SHELLTYPE) |
update-subdirs: update-subdirs-$(SHELLTYPE) |
231 |
|
|
232 |
update-subdirs-CMD: doit |
update-subdirs-CMD: doit |
233 |
@set QWINS= |
echo ;; -*- no-byte-compile: t -*->subdirs.el |
234 |
@for %d in ($(WINS)) do if not (%d)==(term) set QWINS=%QWINS% "%d" |
echo ;; In load-path, after this directory should come>> subdirs.el |
|
echo ;; In load-path, after this directory should come> subdirs.el |
|
235 |
echo ;; certain of its subdirectories. Here we specify them.>> subdirs.el |
echo ;; certain of its subdirectories. Here we specify them.>> subdirs.el |
236 |
echo (normal-top-level-add-to-load-path $(SQUOTE)(%QWINS%))>> subdirs.el |
echo (normal-top-level-add-to-load-path $(SQUOTE)(>> subdirs.el |
237 |
|
@for %d in ($(WINS)) do if not (%d)==(term) echo "%d">> subdirs.el |
238 |
|
echo ))>> subdirs.el |
239 |
|
|
240 |
update-subdirs-SH: doit |
update-subdirs-SH: doit |
241 |
wd=$(lisp); $(setwins); \ |
$(srcdir)/update-subdirs $(lisp); \ |
242 |
for file in $$wins; do \ |
for file in $(WINS); do \ |
243 |
$(srcdir)/update-subdirs $$file; \ |
$(srcdir)/update-subdirs $$file; \ |
244 |
done; |
done; |
245 |
|
|
246 |
updates: update-subdirs autoloads finder-data custom-deps |
updates: update-subdirs autoloads finder-data custom-deps |
247 |
|
|
248 |
|
# Update the AUTHORS file. |
249 |
|
|
250 |
|
update-authors: |
251 |
|
$(emacs) -f batch-update-authors $(srcdir)/AUTHORS $(srcdir) |
252 |
|
|
253 |
TAGS: $(lisptagsfiles1) $(lisptagsfiles2) |
TAGS: $(lisptagsfiles1) $(lisptagsfiles2) |
254 |
$(ETAGS) $(lisptagsfiles1) $(lisptagsfiles2) |
$(ETAGS) $(lisptagsfiles1) $(lisptagsfiles2) |
255 |
|
|
256 |
TAGS-LISP: $(lispsource)$(lisptagsfiles1) $(lispsource)$(lisptagsfiles2) |
TAGS-LISP: $(lisptagsfiles1) $(lisptagsfiles2) |
257 |
$(ETAGS) -o TAGS-LISP $(lispsource)$(lisptagsfiles1) $(lispsource)$(lisptagsfiles2) |
$(ETAGS) -o TAGS-LISP $(lisptagsfiles1) $(lisptagsfiles2) |
258 |
|
|
259 |
.SUFFIXES: .elc .el |
.SUFFIXES: .elc .el |
260 |
|
|
264 |
$(DONTCOMPILE:.el=.elc): |
$(DONTCOMPILE:.el=.elc): |
265 |
-$(DEL) $@ |
-$(DEL) $@ |
266 |
|
|
267 |
# Compile all Lisp files, except those from DONTCOMPILE. This |
# Compile all Lisp files, except those from DONTCOMPILE, |
268 |
# compiles files unconditionally. All .elc files are made writable |
# but don't recompile those that are up to date. |
269 |
|
|
270 |
|
# All .elc files are made writable |
271 |
# before compilation in case we checked out read-only (CVS option -r). |
# before compilation in case we checked out read-only (CVS option -r). |
272 |
# Files MUST be compiled one by one. If we compile several files in a |
# Files MUST be compiled one by one. If we compile several files in a |
273 |
# row we can't make sure that the compilation environment is clean. |
# row we can't make sure that the compilation environment is clean. |
276 |
# load's in the files being compiled find the right files. |
# load's in the files being compiled find the right files. |
277 |
|
|
278 |
# Need separate version for sh and native cmd.exe |
# Need separate version for sh and native cmd.exe |
279 |
compile-files: subdirs.el compile-files-$(SHELLTYPE) doit |
compile: subdirs.el compile-$(SHELLTYPE) doit |
280 |
|
|
281 |
compile-files-CMD: |
compile-CMD: |
282 |
|
# -for %f in ($(lisp) $(WINS)) do for %g in (%f\*.elc) do @attrib -r %g |
283 |
|
for %f in ($(COMPILE_FIRST)) do \ |
284 |
|
$(emacs) -l loaddefs -f batch-byte-compile-if-not-done %f |
285 |
|
for %f in (. $(WINS)) do for %g in (%f/*.el) do \ |
286 |
|
$(emacs) -l loaddefs -f batch-byte-compile-if-not-done %f/%g |
287 |
|
|
288 |
|
compile-SH: |
289 |
|
# for elc in $(lisp)/*.elc $(lisp)/*/*.elc; do attrib -r $$elc; done |
290 |
|
for el in $(COMPILE_FIRST); do \ |
291 |
|
echo Compiling $$el; \ |
292 |
|
$(emacs) -l loaddefs -f batch-byte-compile-if-not-done $$el; \ |
293 |
|
done |
294 |
|
for dir in $(lisp) $(WINS); do \ |
295 |
|
for el in $$dir/*.el; do \ |
296 |
|
if test -f $$el; \ |
297 |
|
then \ |
298 |
|
echo Compiling $$el; \ |
299 |
|
$(emacs) -l loaddefs -f batch-byte-compile-if-not-done $$el; \ |
300 |
|
fi \ |
301 |
|
done; \ |
302 |
|
done |
303 |
|
|
304 |
|
# Compile all Lisp files, except those from DONTCOMPILE. This |
305 |
|
# is like `compile' but compiles files unconditionally. |
306 |
|
compile-always: subdirs.el compile-always-$(SHELLTYPE) doit |
307 |
|
|
308 |
|
compile-always-CMD: |
309 |
# -for %f in ($(lisp) $(WINS)) do for %g in (%f\*.elc) do @attrib -r %g |
# -for %f in ($(lisp) $(WINS)) do for %g in (%f\*.elc) do @attrib -r %g |
310 |
for %f in ($(COMPILE_FIRST)) do $(emacs) -f batch-byte-compile %f |
for %f in ($(COMPILE_FIRST)) do $(emacs) -f batch-byte-compile %f |
311 |
for %f in (. $(WINS)) do for %g in (%f/*.el) do $(emacs) -f batch-byte-compile %f/%g |
for %f in (. $(WINS)) do for %g in (%f/*.el) do $(emacs) -f batch-byte-compile %f/%g |
312 |
|
|
313 |
compile-files-SH: |
compile-always-SH: |
314 |
# for elc in $(lisp)/*.elc $(lisp)/*/*.elc; do attrib -r $$elc; done |
# for elc in $(lisp)/*.elc $(lisp)/*/*.elc; do attrib -r $$elc; done |
315 |
for el in $(COMPILE_FIRST); do \ |
for el in $(COMPILE_FIRST); do \ |
316 |
echo Compiling $$el; \ |
echo Compiling $$el; \ |
317 |
$(emacs) -f batch-byte-compile $$el; \ |
$(emacs) -f batch-byte-compile $$el || exit 1; \ |
318 |
done |
done |
319 |
for dir in $(lisp) $(WINS); do \ |
for dir in $(lisp) $(WINS); do \ |
320 |
for el in $$dir/*.el; do \ |
for el in $$dir/*.el; do \ |
321 |
echo Compiling $$el; \ |
echo Compiling $$el; \ |
322 |
$(emacs) -f batch-byte-compile $$el; \ |
$(emacs) -f batch-byte-compile $$el || exit 1; \ |
323 |
done; \ |
done; \ |
324 |
done |
done |
325 |
|
|
326 |
|
compile-calc: compile-calc-$(SHELLTYPE) |
327 |
|
|
328 |
|
compile-calc-CMD: |
329 |
|
for %f in ($(lisp)/calc/*.el) do $(emacs) -f batch-byte-compile %f |
330 |
|
|
331 |
|
compile-calc-SH: |
332 |
|
for el in $(lisp)/calc/*.el; do \ |
333 |
|
echo Compiling $$el; \ |
334 |
|
$(emacs) -f batch-byte-compile $$el || exit 1; \ |
335 |
|
done |
336 |
|
|
337 |
# Backup compiled Lisp files in elc.tar.gz. If that file already |
# Backup compiled Lisp files in elc.tar.gz. If that file already |
338 |
# exists, make a backup of it. |
# exists, make a backup of it. |
339 |
|
|
343 |
|
|
344 |
# Compile Lisp files, but save old compiled files first. |
# Compile Lisp files, but save old compiled files first. |
345 |
|
|
346 |
compile: backup-compiled-files compile-files |
compile-after-backup: backup-compiled-files compile-always |
347 |
|
|
348 |
# Recompile all Lisp files which are newer than their .elc files. |
# Recompile all Lisp files which are newer than their .elc files. |
349 |
# Note that this doesn't create .elc files. It only recompiles if an |
# Note that this doesn't create .elc files. It only recompiles if an |
350 |
# .elc is present. |
# .elc is present. |
351 |
|
|
352 |
recompile: doit |
recompile: doit |
353 |
$(emacs) -f batch-byte-recompile-directory . |
$(emacs) -f batch-byte-recompile-directory $(lisp) |
354 |
|
|
355 |
# Prepare a bootstrap in the lisp subdirectory. Build loaddefs.el, |
# Prepare a bootstrap in the lisp subdirectory. Build loaddefs.el, |
356 |
# because it's not sure it's up-to-date, and if it's not, that might |
# because it's not sure it's up-to-date, and if it's not, that might |
359 |
# bootstrap-emacs will be built from sources only. |
# bootstrap-emacs will be built from sources only. |
360 |
|
|
361 |
# Need separate version for sh and native cmd.exe |
# Need separate version for sh and native cmd.exe |
362 |
bootstrap-clean: bootstrap-clean-$(SHELLTYPE) |
bootstrap-clean: bootstrap-clean-$(SHELLTYPE) loaddefs.el |
363 |
|
|
364 |
bootstrap-clean-CMD: |
bootstrap-clean-CMD: |
365 |
# if exist $(EMACS) $(MAKE) $(MFLAGS) autoloads |
# if exist $(EMACS) $(MAKE) $(MFLAGS) autoloads |
372 |
|
|
373 |
# Generate/update files for the bootstrap process. |
# Generate/update files for the bootstrap process. |
374 |
|
|
375 |
bootstrap: autoloads compile-files custom-deps |
bootstrap: update-subdirs autoloads compile finder-data custom-deps |
376 |
|
|
377 |
# |
# |
378 |
# Assuming INSTALL_DIR is defined, copy the elisp files to it |
# Assuming INSTALL_DIR is defined, copy the elisp files to it |
403 |
|
|
404 |
# |
# |
405 |
# Maintenance |
# Maintenance |
406 |
# |
# |
407 |
clean: |
clean: |
408 |
- $(DEL) *~ |
- $(DEL) *~ |