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