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