* verilog-mode.el (verilog-vmm-begin-re, verilog-vmm-end-re,
[bpt/emacs.git] / lisp / makefile.w32-in
CommitLineData
5288ec68
GM
1# -*- Makefile -*- for GNU Emacs on the Microsoft W32 API.
2# Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
3# 2009 Free Software Foundation, Inc.
eb3fa2cf 4
5288ec68 5# This file is part of GNU Emacs.
eb3fa2cf
GM
6
7# GNU Emacs is free software: you can redistribute it and/or modify
8# it under the terms of the GNU General Public License as published by
9# the Free Software Foundation, either version 3 of the License, or
10# (at your option) any later version.
11
12# GNU Emacs is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15# GNU General Public License for more details.
16
17# You should have received a copy of the GNU General Public License
18# along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
7bbaaedd
AI
19
20ALL =
21
22all: $(ALL)
23
24SQUOTE='
25# '
26
6610f4b2 27lisp = $(CURDIR)
9b006cb2 28srcdir = $(CURDIR)/..
7bbaaedd
AI
29
30# You can specify a different executable on the make command line,
31# e.g. "make EMACS=../src/emacs ...".
32
3196bfd2 33EMACS = $(THISDIR)/../bin/emacs.exe
7bbaaedd
AI
34
35# Command line flags for Emacs. This must include --multibyte,
36# otherwise some files will not compile.
37
38EMACSOPT = -batch --no-init-file --no-site-file --multibyte
39
8b9a5623
EZ
40# Extra flags to pass to the byte compiler
41BYTE_COMPILE_EXTRA_FLAGS =
42# For example to not display the undefined function warnings you can use this:
43# BYTE_COMPILE_EXTRA_FLAGS = --eval '(setq byte-compile-warnings (quote (not unresolved)))'
44# The example above is just for developers, it should not be used by default.
45
cc7aa053
AI
46# Set EMACSLOADPATH correctly (already defined in environment).
47EMACSLOADPATH=$(lisp)
48
dd6ab82f
MB
49# Use C locale
50LC_ALL = C
51
7bbaaedd
AI
52lisptagsfiles1 = $(lisp)/*.el
53lisptagsfiles2 = $(lisp)/*/*.el
54ETAGS = "../lib-src/$(BLD)/etags"
55
c79a07d7
EZ
56# Automatically generated autoload files, apart from lisp/loaddefs.el.
57LOADDEFS = $(lisp)/calendar/cal-loaddefs.el \
3dc94c30
JR
58 $(lisp)/calendar/diary-loaddefs.el $(lisp)/calendar/hol-loaddefs.el \
59 $(lisp)/mh-e/mh-loaddefs.el
60
61AUTOGENEL = $(lisp)/loaddefs.el $(LOADDEFS) $(lisp)/cus-load.el \
f01d54ca 62 $(lisp)/finder-inf.el $(lisp)/subdirs.el $(lisp)/eshell/esh-groups.el \
8f885d01
EZ
63 $(lisp)/calc/calc-loaddefs.el $(lisp)/nxml/subdirs.el \
64 $(lisp)/cedet/semantic/loaddefs.el $(lisp)/cedet/ede/loaddefs.el \
65 $(lisp)/cedet/srecode/loaddefs.el
c79a07d7 66
170a9e70
GM
67# Files to compile before others during a bootstrap. This is done to
68# speed up the bootstrap process. The CC files are compiled first
69# because CC mode tweaks the compilation process, and requiring
70# cc-mode when it is not compiled doesn't work during the
71# bootstrapping.
7bbaaedd
AI
72
73COMPILE_FIRST = \
74 $(lisp)/emacs-lisp/byte-opt.el \
75 $(lisp)/emacs-lisp/bytecomp.el \
170a9e70
GM
76 $(lisp)/subr.el \
77 $(lisp)/progmodes/cc-mode.el \
78 $(lisp)/progmodes/cc-vars.el
7bbaaedd
AI
79
80# The actual Emacs command run in the targets below.
3196bfd2
EZ
81# The quotes around $(EMACS) are here because the user could type
82# it with forward slashes and without quotes, which will fail if
83# the shell is cmd.exe.
7bbaaedd 84
3196bfd2 85emacs = "$(EMACS)" $(EMACSOPT)
7bbaaedd 86
7bbaaedd 87# Have to define the list of subdirs manually when not using sh.
79711e36 88WINS_CEDET=\
d2bda74f 89 cedet \
79711e36
JB
90 cedet/ede \
91 cedet/semantic \
92 cedet/srecode
93
b4a74f30
EZ
94WINS_CEDET_SUBDIRS=\
95 cedet/semantic/analyze \
96 cedet/semantic/bovine \
97 cedet/semantic/decorate \
98 cedet/semantic/symref \
99 cedet/semantic/wisent
100
79711e36 101WINS_BASIC=\
1142be39 102 calc \
7bbaaedd
AI
103 calendar \
104 emacs-lisp \
105 emulation \
3e66f07c 106 erc \
7bbaaedd
AI
107 eshell \
108 gnus \
109 international \
110 language \
111 mail \
942da20c 112 mh-e \
7bbaaedd 113 net \
14521da1 114 nxml \
41d7a854 115 org \
7bbaaedd
AI
116 play \
117 progmodes \
b036f5d8 118 textmodes \
05cecc58 119 url
7bbaaedd 120
8c4afe20 121# Directories with lisp files to compile
79711e36
JB
122WINS_ALMOST=$(WINS_BASIC) \
123 $(WINS_CEDET)
124
8c4afe20 125# Directories to extract data from (customs, autoloads, etc.)
872a1ea4 126WINS_UPDATES=$(WINS_ALMOST) \
8c4afe20
JB
127 $(WINS_CEDET_SUBDIRS)
128
129# Directories to add to subdirs.el
79711e36
JB
130WINS_SUBDIR=$(WINS_BASIC) \
131 obsolete
132
8c4afe20 133# All directories, except CEDET subdirs
3aeca4ac 134WINS= $(WINS_ALMOST) \
cba3dac5 135 term \
3aeca4ac
JB
136 obsolete
137
7bbaaedd
AI
138doit:
139
d2373df5
EZ
140cus-load.el-SH:
141 echo ";;; cus-load.el --- automatically extracted custom dependencies" > $@
142 echo ";;" >> $@; echo ";;; Code:" >> $@
143 echo "\f" >> $@
144 echo ";; Local Variables:" >> $@
145 echo ";; version-control: never" >> $@
146 echo ";; no-byte-compile: t" >> $@
147 echo ";; no-update-autoloads: t" >> $@
148 echo ";; End:" >> $@
149
150cus-load.el-CMD:
151 echo ;;; cus-load.el --- automatically extracted custom dependencies> $@
152 echo ;;>> $@
153 echo ;;; Code:>> $@
154 echo.\f>> $@
155 echo ;; Local Variables:>> $@
156 echo ;; version-control: never>> $@
157 echo ;; no-byte-compile: t>> $@
158 echo ;; no-update-autoloads: t>> $@
159 echo ;; End:>> $@
160
bad197f0 161$(lisp)/cus-load.el:
d2373df5
EZ
162 $(MAKE) $(MFLAGS) cus-load.el-$(SHELLTYPE)
163 mv cus-load.el-$(SHELLTYPE) $@
164
c3d49b7a
EZ
165# WARNING: Do NOT split the part inside $(ARGQUOTE)s into multiple lines as
166# this can break with GNU Make 3.81 and later if sh.exe is used.
f2133d9e 167custom-deps: $(lisp)/cus-load.el $(lisp)/loaddefs.el doit
8c4afe20
JB
168 @echo Directories: $(WINS_UPDATES)
169 -$(emacs) -l cus-dep --eval $(ARGQUOTE)(setq find-file-hook nil)$(ARGQUOTE) \
170 -f custom-make-dependencies $(lisp) $(WINS_UPDATES)
7bbaaedd 171
f2133d9e 172finder-data: $(lisp)/loaddefs.el doit
8c4afe20
JB
173 @echo Directories: $(WINS_UPDATES)
174 $(emacs) -l finder -f finder-compile-keywords-make-dist $(lisp) $(WINS_UPDATES)
7bbaaedd 175
bad197f0 176$(lisp)/loaddefs.el:
e22b24eb
AI
177 $(MAKE) $(MFLAGS) loaddefs.el-$(SHELLTYPE)
178 cp loaddefs.el-$(SHELLTYPE) $@
179 rm loaddefs.el-$(SHELLTYPE)
180
181loaddefs.el-SH:
182 echo ";;; loaddefs.el --- automatically extracted autoloads" > $@
183 echo ";;" >> $@; echo ";;; Code:" >> $@
e22b24eb 184 echo "\f" >> $@
329b2661
JB
185 echo ";; Local Variables:" >> $@
186 echo ";; version-control: never" >> $@
187 echo ";; no-byte-compile: t" >> $@
188 echo ";; no-update-autoloads: t" >> $@
189 echo ";; coding: utf-8" >> $@
190 echo ";; End:" >> $@
e22b24eb
AI
191 echo ";;; loaddefs.el ends here" >> $@
192
193loaddefs.el-CMD:
7bbaaedd 194 echo ;;; loaddefs.el --- automatically extracted autoloads> $@
329b2661 195 echo ;;>> $@
7bbaaedd 196 echo ;;; Code:>> $@
bad197f0 197 echo.\f>> $@
329b2661
JB
198 echo ;; Local Variables:>> $@
199 echo ;; version-control: never>> $@
200 echo ;; no-byte-compile: t>> $@
201 echo ;; no-update-autoloads: t>> $@
202 echo ;; coding: utf-8>> $@
203 echo ;; End:>> $@
7bbaaedd
AI
204 echo ;;; loaddefs.el ends here>> $@
205
81293113
EZ
206# Use . instead of $(lisp) because $(lisp) is an absolute file name,
207# including a drive letter and any leading directories, so the generated
208# loaddefs.el will mention file names that on other machine reference
209# possibly non-existent directories.
c3d49b7a
EZ
210#
211# WARNING: Do NOT split the part inside $(ARGQUOTE)s into multiple lines as
212# this can break with GNU Make 3.81 and later if sh.exe is used.
c79a07d7 213autoloads: $(lisp)/loaddefs.el $(LOADDEFS) doit
8c4afe20 214 @echo Directories: . $(WINS_UPDATES)
c5bdb93d 215 $(emacs) -l autoload \
7c417300 216 --eval $(ARGQUOTE)(setq find-file-hook nil find-file-suppress-same-file-warnings t)$(ARGQUOTE) \
5288ec68 217 -f w32-batch-update-autoloads "$(lisp)/loaddefs.el" $(MAKE) . $(WINS_UPDATES)
7bbaaedd 218
bad197f0 219$(lisp)/subdirs.el:
7bbaaedd
AI
220 $(MAKE) $(MFLAGS) update-subdirs
221
222# Need separate version for sh and native cmd.exe
223update-subdirs: update-subdirs-$(SHELLTYPE)
224
225update-subdirs-CMD: doit
bad197f0
JR
226 echo ;; -*- no-byte-compile: t -*-> $(lisp)/subdirs.el
227 echo ;; In load-path, after this directory should come>> $(lisp)/subdirs.el
228 echo ;; certain of its subdirectories. Here we specify them.>> $(lisp)/subdirs.el
229 echo (normal-top-level-add-to-load-path $(SQUOTE)(>> $(lisp)/subdirs.el
a5b7b0eb 230 @for %%d in ($(WINS_SUBDIR) cedet) do echo "%%d">> $(lisp)/subdirs.el
bad197f0 231 echo ))>> $(lisp)/subdirs.el
7bbaaedd
AI
232
233update-subdirs-SH: doit
0cfc4b54 234 $(srcdir)/update-subdirs $(lisp); \
d2bda74f 235 for file in $(WINS_SUBDIR); do \
7bbaaedd
AI
236 $(srcdir)/update-subdirs $$file; \
237 done;
238
ba2b2673 239updates: update-subdirs autoloads mh-autoloads finder-data custom-deps
7bbaaedd 240
a9d25c79
EZ
241# This is useful after "cvs up".
242cvs-update: recompile autoloads finder-data custom-deps
243
9b006cb2
AI
244# Update the AUTHORS file.
245
246update-authors:
ed5e0894 247 $(emacs) -l authors -f batch-update-authors $(srcdir)/etc/AUTHORS $(srcdir)
9b006cb2 248
7bbaaedd
AI
249TAGS: $(lisptagsfiles1) $(lisptagsfiles2)
250 $(ETAGS) $(lisptagsfiles1) $(lisptagsfiles2)
251
9b006cb2
AI
252TAGS-LISP: $(lisptagsfiles1) $(lisptagsfiles2)
253 $(ETAGS) -o TAGS-LISP $(lisptagsfiles1) $(lisptagsfiles2)
7bbaaedd 254
49060c51
AI
255.SUFFIXES: .elc .el
256
7bbaaedd 257.el.elc:
8b9a5623 258 -$(emacs) $(BYTE_COMPILE_EXTRA_FLAGS) -f batch-byte-compile $<
7bbaaedd 259
8f801552
LK
260# Compile all Lisp files, but don't recompile those that are up to
261# date. Some files don't actually get compiled because they set the
262# local variable no-byte-compile.
7bbaaedd 263
8f801552
LK
264# All .elc files are made writable before compilation in case we
265# checked out read-only (CVS option -r). Files MUST be compiled one by
266# one. If we compile several files in a row we can't make sure that
267# the compilation environment is clean. We also set the load-path of
268# the Emacs used for compilation to the current directory and its
269# subdirectories, to make sure require's and load's in the files being
270# compiled find the right files.
7bbaaedd
AI
271
272# Need separate version for sh and native cmd.exe
bad197f0 273compile: $(lisp)/subdirs.el mh-autoloads compile-$(SHELLTYPE) doit
7bbaaedd 274
d198b6f5 275compile-CMD:
80bb1e21
JR
276# -for %%f in ($(lisp) $(WINS)) do for %%g in (%%f\*.elc) do @attrib -r %%g
277 for %%f in ($(COMPILE_FIRST)) do \
8b9a5623 278 $(emacs) -l loaddefs $(BYTE_COMPILE_EXTRA_FLAGS) -f batch-byte-compile-if-not-done %%f
80bb1e21 279 for %%f in (. $(WINS)) do for %%g in (%%f/*.el) do \
8b9a5623 280 $(emacs) -l loaddefs $(BYTE_COMPILE_EXTRA_FLAGS) -f batch-byte-compile-if-not-done %%f/%%g
0702b995 281
d198b6f5 282compile-SH:
9b006cb2
AI
283# for elc in $(lisp)/*.elc $(lisp)/*/*.elc; do attrib -r $$elc; done
284 for el in $(COMPILE_FIRST); do \
285 echo Compiling $$el; \
8b9a5623 286 $(emacs) -l loaddefs $(BYTE_COMPILE_EXTRA_FLAGS) -f batch-byte-compile-if-not-done $$el; \
9b006cb2
AI
287 done
288 for dir in $(lisp) $(WINS); do \
289 for el in $$dir/*.el; do \
290 if test -f $$el; \
291 then \
292 echo Compiling $$el; \
8b9a5623 293 $(emacs) -l loaddefs $(BYTE_COMPILE_EXTRA_FLAGS) -f batch-byte-compile-if-not-done $$el; \
9b006cb2
AI
294 fi \
295 done; \
296 done
297
8f801552
LK
298# Compile all Lisp files. This is like `compile' but compiles files
299# unconditionally. Some files don't actually get compiled because they
300# set the local variable no-byte-compile.
301
bad197f0 302compile-always: $(lisp)/subdirs.el compile-always-$(SHELLTYPE) doit
9b006cb2
AI
303
304compile-always-CMD:
80bb1e21 305# -for %%f in ($(lisp) $(WINS)) do for %%g in (%%f\*.elc) do @attrib -r %%g
8b9a5623
EZ
306 for %%f in ($(COMPILE_FIRST)) do $(emacs) $(BYTE_COMPILE_EXTRA_FLAGS) -f batch-byte-compile %%f
307 for %%f in (. $(WINS)) do for %%g in (%%f/*.el) do $(emacs) $(BYTE_COMPILE_EXTRA_FLAGS) -f batch-byte-compile %%f/%%g
7bbaaedd 308
9b006cb2 309compile-always-SH:
7bbaaedd
AI
310# for elc in $(lisp)/*.elc $(lisp)/*/*.elc; do attrib -r $$elc; done
311 for el in $(COMPILE_FIRST); do \
312 echo Compiling $$el; \
8b9a5623 313 $(emacs) $(BYTE_COMPILE_EXTRA_FLAGS) -f batch-byte-compile $$el || exit 1; \
7bbaaedd
AI
314 done
315 for dir in $(lisp) $(WINS); do \
316 for el in $$dir/*.el; do \
317 echo Compiling $$el; \
8b9a5623 318 $(emacs) $(BYTE_COMPILE_EXTRA_FLAGS) -f batch-byte-compile $$el || exit 1; \
7bbaaedd
AI
319 done; \
320 done
321
9b006cb2
AI
322compile-calc: compile-calc-$(SHELLTYPE)
323
324compile-calc-CMD:
8b9a5623 325 for %%f in ($(lisp)/calc/*.el) do $(emacs) $(BYTE_COMPILE_EXTRA_FLAGS) -f batch-byte-compile %%f
9b006cb2 326
c45dbde8 327compile-calc-SH:
9b006cb2
AI
328 for el in $(lisp)/calc/*.el; do \
329 echo Compiling $$el; \
8b9a5623 330 $(emacs) $(BYTE_COMPILE_EXTRA_FLAGS) -f batch-byte-compile $$el || exit 1; \
9b006cb2
AI
331 done
332
7bbaaedd
AI
333# Backup compiled Lisp files in elc.tar.gz. If that file already
334# exists, make a backup of it.
335
336backup-compiled-files:
337 -mv $(lisp)/elc.tar.gz $(lisp)/elc.tar.gz~
338 -tar czf $(lisp)/elc.tar.gz $(lisp)/*.elc $(lisp)/*/*.elc
339
340# Compile Lisp files, but save old compiled files first.
341
d198b6f5 342compile-after-backup: backup-compiled-files compile-always
7bbaaedd 343
0b8e2d21
EZ
344compile-first: $(lisp)/emacs-lisp/bytecomp.elc $(lisp)/emacs-lisp/byte-opt.elc \
345 $(lisp)/emacs-lisp/autoload.elc
346
7bbaaedd
AI
347# Recompile all Lisp files which are newer than their .elc files.
348# Note that this doesn't create .elc files. It only recompiles if an
349# .elc is present.
53fad1e4
EZ
350# WARNING: Do NOT split the part inside $(ARGQUOTE)s into multiple lines as
351# this can break with GNU Make 3.81 and later if sh.exe is used.
0b8e2d21 352recompile: compile-first autoloads doit $(lisp)/progmodes/cc-mode.elc
53fad1e4 353 $(emacs) --eval $(ARGQUOTE)(batch-byte-recompile-directory 0)$(ARGQUOTE) $(lisp)
7bbaaedd 354
c79a07d7
EZ
355$(lisp)/calendar/cal-loaddefs.el:
356 "$(EMACS)" $(EMACSOPT) -l autoload \
357 --eval "(setq generate-autoload-cookie \";;;###cal-autoload\")" \
358 --eval "(setq find-file-suppress-same-file-warnings t)" \
359 --eval "(setq make-backup-files nil)" \
360 -f w32-batch-update-autoloads "$(lisp)/calendar/cal-loaddefs.el" \
5288ec68 361 $(MAKE) ./calendar
c79a07d7
EZ
362
363$(lisp)/calendar/diary-loaddefs.el:
364 "$(EMACS)" $(EMACSOPT) -l autoload \
365 --eval "(setq generate-autoload-cookie \";;;###diary-autoload\")" \
366 --eval "(setq find-file-suppress-same-file-warnings t)" \
367 --eval "(setq make-backup-files nil)" \
368 -f w32-batch-update-autoloads $(lisp)/calendar/diary-loaddefs.el \
5288ec68 369 $(MAKE) ./calendar
c79a07d7
EZ
370
371$(lisp)/calendar/hol-loaddefs.el:
372 "$(EMACS)" $(EMACSOPT) -l autoload \
373 --eval "(setq generate-autoload-cookie \";;;###holiday-autoload\")" \
374 --eval "(setq find-file-suppress-same-file-warnings t)" \
375 --eval "(setq make-backup-files nil)" \
376 -f w32-batch-update-autoloads $(lisp)/calendar/hol-loaddefs.el \
5288ec68 377 $(MAKE) ./calendar
c79a07d7 378
ba2b2673
BW
379# Update MH-E internal autoloads. These are not to be confused with
380# the autoloads for the MH-E entry points, which are already in
381# loaddefs.el.
e9b28650 382MH_E_SRC = $(lisp)/mh-e/mh-acros.el $(lisp)/mh-e/mh-alias.el \
3e66f07c
JB
383 $(lisp)/mh-e/mh-buffers.el $(lisp)/mh-e/mh-compat.el \
384 $(lisp)/mh-e/mh-comp.el $(lisp)/mh-e/mh-e.el \
385 $(lisp)/mh-e/mh-folder.el $(lisp)/mh-e/mh-funcs.el \
386 $(lisp)/mh-e/mh-gnus.el $(lisp)/mh-e/mh-identity.el \
387 $(lisp)/mh-e/mh-inc.el $(lisp)/mh-e/mh-junk.el \
388 $(lisp)/mh-e/mh-letter.el $(lisp)/mh-e/mh-limit.el \
389 $(lisp)/mh-e/mh-mime.el $(lisp)/mh-e/mh-print.el \
390 $(lisp)/mh-e/mh-scan.el $(lisp)/mh-e/mh-search.el \
391 $(lisp)/mh-e/mh-seq.el $(lisp)/mh-e/mh-show.el \
392 $(lisp)/mh-e/mh-speed.el $(lisp)/mh-e/mh-thread.el \
393 $(lisp)/mh-e/mh-tool-bar.el $(lisp)/mh-e/mh-utils.el \
394 $(lisp)/mh-e/mh-xface.el
ba2b2673 395
43618a57
EZ
396# See the commentary for autoloads above for why we use ./mh-e below
397# instead of $(lisp)/mh-e.
ba2b2673 398mh-autoloads: $(lisp)/mh-e/mh-loaddefs.el
e9b28650 399$(lisp)/mh-e/mh-loaddefs.el: $(MH_E_SRC)
3152b1eb 400 "$(EMACS)" $(EMACSOPT) \
e3188d80 401 -l autoload \
3dc94c30
JR
402 --eval $(ARGQUOTE)(setq generate-autoload-cookie $(DQUOTE);;;###mh-autoload$(DQUOTE))$(ARGQUOTE) \
403 --eval $(ARGQUOTE)(setq find-file-suppress-same-file-warnings t)$(ARGQUOTE) \
404 --eval $(ARGQUOTE)(setq make-backup-files nil)$(ARGQUOTE) \
7c417300 405 -f w32-batch-update-autoloads \
5288ec68 406 $(ARGQUOTE)$(lisp)/mh-e/mh-loaddefs.el$(ARGQUOTE) $(MAKE) ./mh-e
e3188d80 407
54ab09c4
MB
408# Prepare a bootstrap in the lisp subdirectory.
409#
e8dbbf6f
EZ
410# Build loaddefs.el to make sure it's up-to-date. If it's not, that
411# might lead to errors during the bootstrap because something fails to
412# autoload as expected. If there is no emacs binary, then we can't
413# build autoloads yet. In that case we have to use ldefs-boot.el;
414# bootstrap should always work with ldefs-boot.el. (Because
415# loaddefs.el is an automatically generated file, we don't want to
416# store it in the source repository).
54ab09c4
MB
417#
418# Remove compiled Lisp files so that bootstrap-emacs will be built from
419# sources only.
7bbaaedd
AI
420
421# Need separate version for sh and native cmd.exe
329b2661
JB
422bootstrap-clean:
423 - $(DEL) $(lisp)/loaddefs.el
512dd711 424 $(MAKE) $(MFLAGS) bootstrap-clean-$(SHELLTYPE)
7bbaaedd
AI
425
426bootstrap-clean-CMD:
3152b1eb 427# if exist "$(EMACS)" $(MAKE) $(MFLAGS) autoloads
80bb1e21 428 -for %%f in (. $(WINS)) do for %%g in (%%f\*.elc) do @$(DEL) %%g
b4a74f30 429 -for %%f in ($(WINS_CEDET_SUBDIRS)) do for %%g in (%%f\*.elc) do @$(DEL) %%g
7bbaaedd
AI
430
431bootstrap-clean-SH:
3152b1eb 432# if test -f "$(EMACS)"; then $(MAKE) $(MFLAGS) autoloads; fi
a3599c30 433# -rm -f $(lisp)/*.elc $(lisp)/*/*.elc
8c4afe20 434 -for dir in . $(WINS) $(WINS_CEDET_SUBDIRS); do rm -f $$dir/*.elc $$dir/*/*.elc $$dir/*/*/*.elc; done
7bbaaedd
AI
435
436# Generate/update files for the bootstrap process.
014b37b6
EZ
437# When done, remove bootstrap-emacs from ../bin, so that
438# it will not be mistaken for an installed binary.
7bbaaedd 439
ba2b2673 440bootstrap: update-subdirs autoloads mh-autoloads compile finder-data custom-deps
3152b1eb 441 - $(DEL) "$(EMACS)"
7bbaaedd
AI
442
443#
444# Assuming INSTALL_DIR is defined, copy the elisp files to it
445# Windows 95 makes this harder than it should be.
446#
447install:
448 - mkdir "$(INSTALL_DIR)/lisp"
449 - $(DEL) ../same-dir.tst
450 - $(DEL) "$(INSTALL_DIR)/same-dir.tst"
451 echo SameDirTest > "$(INSTALL_DIR)/same-dir.tst"
452#ifdef COPY_LISP_SOURCE
564a3032 453 $(IFNOTSAMEDIR) $(MAKE) $(MFLAGS) install-lisp-$(SHELLTYPE) $(ENDIF)
7bbaaedd
AI
454#else
455# $(IFNOTSAMEDIR) $(CP_DIR) *.elc "$(INSTALL_DIR)/lisp" $(ENDIF)
456# $(IFNOTSAMEDIR) $(CP) cus-load.el "$(INSTALL_DIR)/lisp" $(ENDIF)
457# $(IFNOTSAMEDIR) $(CP) forms*.el "$(INSTALL_DIR)/lisp" $(ENDIF)
458# $(IFNOTSAMEDIR) $(CP) patcomp.el "$(INSTALL_DIR)/lisp" $(ENDIF)
459# $(IFNOTSAMEDIR) $(CP) subdirs.el "$(INSTALL_DIR)/lisp" $(ENDIF)
460# $(IFNOTSAMEDIR) $(CP) version.el "$(INSTALL_DIR)/lisp" $(ENDIF)
461# $(IFNOTSAMEDIR) $(CP) mail/blessmail.el "$(INSTALL_DIR)/lisp/mail" $(ENDIF)
462# $(IFNOTSAMEDIR) $(CP) mail/sc.el "$(INSTALL_DIR)/lisp/mail" $(ENDIF)
463# $(IFNOTSAMEDIR) $(CP) play/bruce.el "$(INSTALL_DIR)/lisp/play" $(ENDIF)
464# $(IFNOTSAMEDIR) $(CP) international/latin-*.el "$(INSTALL_DIR)/lisp/international" $(ENDIF)
465# $(IFNOTSAMEDIR) $(CP) international/mule-conf.el "$(INSTALL_DIR)/lisp/international" $(ENDIF)
466#endif
467 - $(DEL) ../same-dir.tst
468 - $(DEL) "$(INSTALL_DIR)/same-dir.tst"
469
564a3032
EZ
470# Need to copy *.el files first, to avoid "source file is newer" annoyance
471# since cp does not preserve time stamps
472install-lisp-SH:
473 cp -f *.el "$(INSTALL_DIR)/lisp"
ec9bbc6c
EZ
474 for dir in $(WINS); do [ -d "$(INSTALL_DIR)/lisp/$$dir" ] || mkdir "$(INSTALL_DIR)/lisp/$$dir"; done
475 for dir in $(WINS); do cp -f $$dir/*.el "$(INSTALL_DIR)/lisp/$$dir"; done
564a3032
EZ
476 for dir in . $(WINS); do cp $$dir/*.elc "$(INSTALL_DIR)/lisp/$$dir"; done
477
478install-lisp-CMD:
479 cp -f *.el "$(INSTALL_DIR)/lisp"
ec9bbc6c 480 for %%f in ($(WINS)) do if not exist "$(INSTALL_DIR)/lisp/%%f" mkdir "$(INSTALL_DIR)/lisp/%%f"
564a3032
EZ
481 for %%f in ($(WINS)) do cp -f %%f/*.el "$(INSTALL_DIR)/lisp/%%f"
482 for %%f in (. $(WINS)) do cp -f %%f/*.elc "$(INSTALL_DIR)/lisp/%%f"
483
8b9a5623
EZ
484# WARNING: Do NOT split the part inside $(ARGQUOTE)s into multiple lines as
485# this can break with GNU Make 3.81 and later if sh.exe is used.
486check-declare:
487 $(emacs) -l $(lisp)/emacs-lisp/check-declare --eval $(ARGQUOTE)(check-declare-directory $(DQUOTE)$(lisp)$(DQUOTE))$(ARGQUOTE)
488
7bbaaedd
AI
489#
490# Maintenance
c45dbde8 491#
a055c272
EZ
492# We used to delete *~ here, but that might inadvertently remove
493# precious files if it happens to match their short 8+3 aliases.
7bbaaedd 494clean:
3dc94c30 495 - $(DEL) *.el~
6eb5ddb8
EZ
496 - $(DEL) calc/calc-loaddefs.el~
497 - $(DEL) eshell/esh-groups.el~
3dc94c30 498
6eb5ddb8 499distclean: clean
3dc94c30
JR
500 - $(DEL) $(lisp)/Makefile
501
502maintainer-clean: bootstrap-clean distclean
503 - $(DEL) $(AUTOGENEL)
1ed6e04d
EZ
504
505# Dependencies
506
507# CC Mode uses a compile time macro system which causes a compile time
508# dependency in cc-*.elc files on the macros in other cc-*.el and the
509# version string in cc-defs.el.
510$(lisp)/progmodes/cc-align.elc $(lisp)/progmodes/cc-awk.elc\
511 $(lisp)/progmodes/cc-cmds.elc $(lisp)/progmodes/cc-compat.elc\
512 $(lisp)/progmodes/cc-engine.elc $(lisp)/progmodes/cc-fonts.elc\
513 $(lisp)/progmodes/cc-langs.elc $(lisp)/progmodes/cc-menus.elc\
514 $(lisp)/progmodes/cc-mode.elc $(lisp)/progmodes/cc-styles.elc\
1f35fda9 515 $(lisp)/progmodes/cc-vars.elc: \
1ed6e04d
EZ
516 $(lisp)/progmodes/cc-bytecomp.elc $(lisp)/progmodes/cc-defs.elc
517
518$(lisp)/progmodes/cc-align.elc: \
519 $(lisp)/progmodes/cc-vars.elc $(lisp)/progmodes/cc-engine.elc
520
521$(lisp)/progmodes/cc-cmds.elc: \
522 $(lisp)/progmodes/cc-vars.elc $(lisp)/progmodes/cc-engine.elc
523
524$(lisp)/progmodes/cc-compat.elc: \
525 $(lisp)/progmodes/cc-vars.elc $(lisp)/progmodes/cc-styles.elc \
526 $(lisp)/progmodes/cc-engine.elc
527
528$(lisp)/progmodes/cc-defs.elc: $(lisp)/progmodes/cc-bytecomp.elc \
529 $(lisp)/emacs-lisp/cl.elc $(lisp)/emacs-lisp/regexp-opt.elc
530
531$(lisp)/progmodes/cc-engine.elc: $(lisp)/progmodes/cc-langs.elc \
532 $(lisp)/progmodes/cc-vars.elc
533
534$(lisp)/progmodes/cc-fonts.elc: $(lisp)/progmodes/cc-langs.elc \
535 $(lisp)/progmodes/cc-vars.elc $(lisp)/progmodes/cc-engine.elc \
536 $(lisp)/font-lock.elc
537
538$(lisp)/progmodes/cc-langs.elc: $(lisp)/progmodes/cc-vars.elc \
539 $(lisp)/emacs-lisp/cl.elc
540
541$(lisp)/progmodes/cc-mode.elc: $(lisp)/progmodes/cc-langs.elc \
542 $(lisp)/progmodes/cc-vars.elc $(lisp)/progmodes/cc-engine.elc \
543 $(lisp)/progmodes/cc-styles.elc $(lisp)/progmodes/cc-cmds.elc \
544 $(lisp)/progmodes/cc-align.elc $(lisp)/progmodes/cc-menus.elc
545
546$(lisp)/progmodes/cc-styles.elc: $(lisp)/progmodes/cc-vars.elc \
547 $(lisp)/progmodes/cc-align.elc
548
1ed6e04d 549$(lisp)/progmodes/cc-vars.elc: $(lisp)/custom.elc $(lisp)/widget.elc
6c4d5dd3
EZ
550
551# MH-E dependencies, mainly to prevent failures with parallel
552# compilation, due to race conditions between writing a given FOO.elc
553# file and another file being compiled that says "(require FOO)",
554# which causes Emacs to try to read FOO.elc.
555MH_E_DIR = ./mh-e
556$(MH_E_DIR)/mh-alias.elc $(MH_E_DIR)/mh-comp.elc $(MH_E_DIR)/mh-folder.elc\
557 $(MH_E_DIR)/mh-funcs.elc $(MH_E_DIR)/mh-identity.elc $(MH_E_DIR)/mh-inc.elc\
558 $(MH_E_DIR)/mh-junk.elc $(MH_E_DIR)/mh-letter.elc $(MH_E_DIR)/mh-limit.elc\
559 $(MH_E_DIR)/mh-mime.elc $(MH_E_DIR)/mh-print.elc $(MH_E_DIR)/mh-scan.elc\
560 $(MH_E_DIR)/mh-search.elc $(MH_E_DIR)/mh-seq.elc $(MH_E_DIR)/mh-show.elc\
561 $(MH_E_DIR)/mh-speed.elc $(MH_E_DIR)/mh-thread.elc $(MH_E_DIR)/mh-tool-bar.elc\
562 $(MH_E_DIR)/mh-utils.elc $(MH_E_DIR)/mh-xface.elc:\
563 $(MH_E_DIR)/mh-e.elc
564
565$(MH_E_DIR)/mh-alias.elc $(MH_E_DIR)/mh-e.elc $(MH_E_DIR)/mh-folder.elc\
566 $(MH_E_DIR)/mh-inc.elc $(MH_E_DIR)/mh-junk.elc $(MH_E_DIR)/mh-limit.elc\
567 $(MH_E_DIR)/mh-search.elc $(MH_E_DIR)/mh-seq.elc $(MH_E_DIR)/mh-speed.elc\
568 $(MH_E_DIR)/mh-utils.elc $(MH_E_DIR)/mh-xface.elc:\
569 $(lisp)/emacs-lisp/cl.elc
570
571$(MH_E_DIR)/mh-comp.elc $(MH_E_DIR)/mh-folder.elc $(MH_E_DIR)/mh-funcs.elc\
572 $(MH_E_DIR)/mh-junk.elc $(MH_E_DIR)/mh-limit.elc $(MH_E_DIR)/mh-print.elc\
573 $(MH_E_DIR)/mh-seq.elc $(MH_E_DIR)/mh-show.elc $(MH_E_DIR)/mh-thread.elc:\
574 $(MH_E_DIR)/mh-scan.elc
575
576$(MH_E_DIR)/mh-folder.elc $(MH_E_DIR)/mh-letter.elc $(MH_E_DIR)/mh-mime.elc\
577 $(MH_E_DIR)/mh-search.elc $(MH_E_DIR)/mh-show.elc $(MH_E_DIR)/mh-speed.elc:\
578 $(lisp)/gnus/gnus-util.elc
579
580$(MH_E_DIR)/mh-folder.elc $(MH_E_DIR)/mh-search.elc:\
581 $(lisp)/progmodes/which-func.elc
582
583$(MH_E_DIR)/mh-letter.elc $(MH_E_DIR)/mh-seq.elc $(MH_E_DIR)/mh-show.elc\
584 $(MH_E_DIR)/mh-utils.elc:\
585 $(lisp)/font-lock.elc
586
587$(MH_E_DIR)/mh-alias.elc $(MH_E_DIR)/mh-show.elc: $(lisp)/net/goto-addr.elc
588
589$(MH_E_DIR)/mh-comp.elc: $(lisp)/mail/sendmail.elc
590
591$(MH_E_DIR)/mh-e.elc: $(MH_E_DIR)/mh-buffers.elc $(lisp)/gnus/gnus.elc \
592 $(lisp)/cus-face.elc
593
594$(MH_E_DIR)/mh-letter.elc: $(lisp)/gnus/mailcap.elc $(lisp)/gnus/mm-decode.elc \
595 $(lisp)/gnus/mm-view.elc $(lisp)/gnus/mml.elc $(lisp)/gnus/message.elc
596
597$(MH_E_DIR)/mh-print.elc: $(lisp)/ps-print.elc
598
599$(MH_E_DIR)/mh-search.elc: $(lisp)/imenu.elc
600
601$(MH_E_DIR)/mh-show.elc: $(lisp)/gnus/gnus-cite.elc
602
603$(MH_E_DIR)/mh-speed.elc: $(lisp)/speedbar.elc $(lisp)/emacs-lisp/timer.elc
604
605$(MH_E_DIR)/mh-tool-bar.elc: $(lisp)/tool-bar.elc