Commit | Line | Data |
---|---|---|
bd6766d3 | 1 | # -*- Makefile -*- for GNU Emacs on the Microsoft W32 API. |
92b47a4a | 2 | # Copyright (C) 2000, 2001, 2002, 2003, 2004, |
409cc4a3 | 3 | # 2005, 2006, 2007, 2008 Free Software Foundation, Inc. |
7bbaaedd AI |
4 | # |
5 | # This file is part of GNU Emacs. | |
c45dbde8 | 6 | # |
7bbaaedd AI |
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 | |
b4aa6026 | 9 | # the Free Software Foundation; either version 3, or (at your option) |
7bbaaedd | 10 | # any later version. |
c45dbde8 | 11 | # |
7bbaaedd AI |
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. | |
c45dbde8 | 16 | # |
7bbaaedd AI |
17 | # You should have received a copy of the GNU General Public License |
18 | # along with GNU Emacs; see the file COPYING. If not, write to the | |
086add15 LK |
19 | # Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
20 | # Boston, MA 02110-1301, USA. | |
7bbaaedd AI |
21 | # |
22 | ||
23 | ALL = | |
24 | ||
25 | all: $(ALL) | |
26 | ||
27 | SQUOTE=' | |
28 | # ' | |
29 | ||
6610f4b2 | 30 | lisp = $(CURDIR) |
9b006cb2 | 31 | srcdir = $(CURDIR)/.. |
7bbaaedd AI |
32 | |
33 | # You can specify a different executable on the make command line, | |
34 | # e.g. "make EMACS=../src/emacs ...". | |
35 | ||
3196bfd2 | 36 | EMACS = $(THISDIR)/../bin/emacs.exe |
7bbaaedd AI |
37 | |
38 | # Command line flags for Emacs. This must include --multibyte, | |
39 | # otherwise some files will not compile. | |
40 | ||
41 | EMACSOPT = -batch --no-init-file --no-site-file --multibyte | |
42 | ||
8b9a5623 EZ |
43 | # Extra flags to pass to the byte compiler |
44 | BYTE_COMPILE_EXTRA_FLAGS = | |
45 | # For example to not display the undefined function warnings you can use this: | |
46 | # BYTE_COMPILE_EXTRA_FLAGS = --eval '(setq byte-compile-warnings (quote (not unresolved)))' | |
47 | # The example above is just for developers, it should not be used by default. | |
48 | ||
cc7aa053 AI |
49 | # Set EMACSLOADPATH correctly (already defined in environment). |
50 | EMACSLOADPATH=$(lisp) | |
51 | ||
dd6ab82f MB |
52 | # Use C locale |
53 | LC_ALL = C | |
54 | ||
7bbaaedd AI |
55 | lisptagsfiles1 = $(lisp)/*.el |
56 | lisptagsfiles2 = $(lisp)/*/*.el | |
57 | ETAGS = "../lib-src/$(BLD)/etags" | |
58 | ||
170a9e70 GM |
59 | # Files to compile before others during a bootstrap. This is done to |
60 | # speed up the bootstrap process. The CC files are compiled first | |
61 | # because CC mode tweaks the compilation process, and requiring | |
62 | # cc-mode when it is not compiled doesn't work during the | |
63 | # bootstrapping. | |
7bbaaedd AI |
64 | |
65 | COMPILE_FIRST = \ | |
66 | $(lisp)/emacs-lisp/byte-opt.el \ | |
67 | $(lisp)/emacs-lisp/bytecomp.el \ | |
170a9e70 GM |
68 | $(lisp)/subr.el \ |
69 | $(lisp)/progmodes/cc-mode.el \ | |
70 | $(lisp)/progmodes/cc-vars.el | |
7bbaaedd AI |
71 | |
72 | # The actual Emacs command run in the targets below. | |
3196bfd2 EZ |
73 | # The quotes around $(EMACS) are here because the user could type |
74 | # it with forward slashes and without quotes, which will fail if | |
75 | # the shell is cmd.exe. | |
7bbaaedd | 76 | |
3196bfd2 | 77 | emacs = "$(EMACS)" $(EMACSOPT) |
7bbaaedd | 78 | |
7bbaaedd | 79 | # Have to define the list of subdirs manually when not using sh. |
3aeca4ac | 80 | WINS_ALMOST=\ |
1142be39 | 81 | calc \ |
7bbaaedd AI |
82 | calendar \ |
83 | emacs-lisp \ | |
84 | emulation \ | |
3e66f07c | 85 | erc \ |
7bbaaedd AI |
86 | eshell \ |
87 | gnus \ | |
88 | international \ | |
89 | language \ | |
90 | mail \ | |
942da20c | 91 | mh-e \ |
7bbaaedd | 92 | net \ |
14521da1 | 93 | nxml \ |
7bbaaedd AI |
94 | play \ |
95 | progmodes \ | |
b036f5d8 | 96 | textmodes \ |
05cecc58 | 97 | url |
7bbaaedd | 98 | |
3aeca4ac | 99 | WINS= $(WINS_ALMOST) \ |
cba3dac5 | 100 | term \ |
3aeca4ac JB |
101 | obsolete |
102 | ||
7bbaaedd AI |
103 | doit: |
104 | ||
bad197f0 | 105 | $(lisp)/cus-load.el: |
7bbaaedd | 106 | touch $@ |
c3d49b7a EZ |
107 | # WARNING: Do NOT split the part inside $(ARGQUOTE)s into multiple lines as |
108 | # this can break with GNU Make 3.81 and later if sh.exe is used. | |
f2133d9e | 109 | custom-deps: $(lisp)/cus-load.el $(lisp)/loaddefs.el doit |
cba3dac5 JR |
110 | @echo Directories: $(WINS_ALMOST) |
111 | -$(emacs) -l cus-dep --eval $(ARGQUOTE)(setq find-file-hook nil)$(ARGQUOTE) -f custom-make-dependencies $(lisp) $(WINS_ALMOST) | |
7bbaaedd | 112 | |
f2133d9e | 113 | finder-data: $(lisp)/loaddefs.el doit |
cba3dac5 JR |
114 | @echo Directories: $(WINS_ALMOST) |
115 | $(emacs) -l finder -f finder-compile-keywords-make-dist $(lisp) $(WINS_ALMOST) | |
7bbaaedd | 116 | |
bad197f0 | 117 | $(lisp)/loaddefs.el: |
e22b24eb AI |
118 | $(MAKE) $(MFLAGS) loaddefs.el-$(SHELLTYPE) |
119 | cp loaddefs.el-$(SHELLTYPE) $@ | |
120 | rm loaddefs.el-$(SHELLTYPE) | |
121 | ||
122 | loaddefs.el-SH: | |
123 | echo ";;; loaddefs.el --- automatically extracted autoloads" > $@ | |
124 | echo ";;" >> $@; echo ";;; Code:" >> $@ | |
125 | echo "(autoload 'define-minor-mode \"easy-mmode\")" >>$@ | |
126 | echo "(autoload 'define-ccl-program \"ccl\")" >>$@ | |
127 | echo "(autoload 'regexp-opt \"regexp-opt\")" >>$@ | |
128 | echo "(autoload 'string-to-list \"mule-util\")" >>$@ | |
129 | echo "(autoload 'define-derived-mode \"derived\")" >>$@ | |
130 | echo "(autoload 'encoded-kbd-mode \"encoded-kb\")" >>$@ | |
131 | echo "(defvar cvs-global-menu nil)" >>$@ | |
132 | echo "\f" >> $@ | |
133 | echo ";;; Local Variables:" >> $@ | |
134 | echo ";;; version-control: never" >> $@ | |
135 | echo ";;; no-byte-compile: t" >> $@ | |
136 | echo ";;; no-update-autoloads: t" >> $@ | |
137 | echo ";;; End:" >> $@ | |
138 | echo ";;; loaddefs.el ends here" >> $@ | |
139 | ||
140 | loaddefs.el-CMD: | |
7bbaaedd AI |
141 | echo ;;; loaddefs.el --- automatically extracted autoloads> $@ |
142 | echo ;;; Code:>> $@ | |
e22b24eb AI |
143 | echo (autoload 'define-minor-mode "easy-mmode")>> $@ |
144 | echo (autoload 'define-ccl-program "ccl")>> $@ | |
145 | echo (autoload 'regexp-opt "regexp-opt")>> $@ | |
146 | echo (autoload 'string-to-list "mule-util")>> $@ | |
147 | echo (autoload 'define-derived-mode "derived")>> $@ | |
148 | echo (autoload 'encoded-kbd-mode "encoded-kb")>> $@ | |
149 | echo (defvar cvs-global-menu nil)>> $@ | |
bad197f0 | 150 | echo.\f>> $@ |
7bbaaedd AI |
151 | echo ;;; Local Variables:>> $@ |
152 | echo ;;; version-control: never>> $@ | |
153 | echo ;;; no-byte-compile: t>> $@ | |
154 | echo ;;; no-update-autoloads: t>> $@ | |
155 | echo ;;; End:>> $@ | |
156 | echo ;;; loaddefs.el ends here>> $@ | |
157 | ||
81293113 EZ |
158 | # Use . instead of $(lisp) because $(lisp) is an absolute file name, |
159 | # including a drive letter and any leading directories, so the generated | |
160 | # loaddefs.el will mention file names that on other machine reference | |
161 | # possibly non-existent directories. | |
c3d49b7a EZ |
162 | # |
163 | # WARNING: Do NOT split the part inside $(ARGQUOTE)s into multiple lines as | |
164 | # this can break with GNU Make 3.81 and later if sh.exe is used. | |
bad197f0 | 165 | autoloads: $(lisp)/loaddefs.el doit |
3aeca4ac | 166 | @echo Directories: . $(WINS_ALMOST) |
c5bdb93d | 167 | $(emacs) -l autoload \ |
7c417300 | 168 | --eval $(ARGQUOTE)(setq find-file-hook nil find-file-suppress-same-file-warnings t)$(ARGQUOTE) \ |
3aeca4ac | 169 | -f w32-batch-update-autoloads "$(lisp)/loaddefs.el" . $(WINS_ALMOST) |
7bbaaedd | 170 | |
bad197f0 | 171 | $(lisp)/subdirs.el: |
7bbaaedd AI |
172 | $(MAKE) $(MFLAGS) update-subdirs |
173 | ||
174 | # Need separate version for sh and native cmd.exe | |
175 | update-subdirs: update-subdirs-$(SHELLTYPE) | |
176 | ||
177 | update-subdirs-CMD: doit | |
bad197f0 JR |
178 | echo ;; -*- no-byte-compile: t -*-> $(lisp)/subdirs.el |
179 | echo ;; In load-path, after this directory should come>> $(lisp)/subdirs.el | |
180 | echo ;; certain of its subdirectories. Here we specify them.>> $(lisp)/subdirs.el | |
181 | echo (normal-top-level-add-to-load-path $(SQUOTE)(>> $(lisp)/subdirs.el | |
182 | @for %%d in ($(WINS)) do if not (%%d)==(term) echo "%%d">> $(lisp)/subdirs.el | |
183 | echo ))>> $(lisp)/subdirs.el | |
7bbaaedd AI |
184 | |
185 | update-subdirs-SH: doit | |
0cfc4b54 | 186 | $(srcdir)/update-subdirs $(lisp); \ |
e22b24eb | 187 | for file in $(WINS); do \ |
7bbaaedd AI |
188 | $(srcdir)/update-subdirs $$file; \ |
189 | done; | |
190 | ||
ba2b2673 | 191 | updates: update-subdirs autoloads mh-autoloads finder-data custom-deps |
7bbaaedd | 192 | |
a9d25c79 EZ |
193 | # This is useful after "cvs up". |
194 | cvs-update: recompile autoloads finder-data custom-deps | |
195 | ||
9b006cb2 AI |
196 | # Update the AUTHORS file. |
197 | ||
198 | update-authors: | |
ed5e0894 | 199 | $(emacs) -l authors -f batch-update-authors $(srcdir)/etc/AUTHORS $(srcdir) |
9b006cb2 | 200 | |
7bbaaedd AI |
201 | TAGS: $(lisptagsfiles1) $(lisptagsfiles2) |
202 | $(ETAGS) $(lisptagsfiles1) $(lisptagsfiles2) | |
203 | ||
9b006cb2 AI |
204 | TAGS-LISP: $(lisptagsfiles1) $(lisptagsfiles2) |
205 | $(ETAGS) -o TAGS-LISP $(lisptagsfiles1) $(lisptagsfiles2) | |
7bbaaedd | 206 | |
49060c51 AI |
207 | .SUFFIXES: .elc .el |
208 | ||
7bbaaedd | 209 | .el.elc: |
8b9a5623 | 210 | -$(emacs) $(BYTE_COMPILE_EXTRA_FLAGS) -f batch-byte-compile $< |
7bbaaedd | 211 | |
8f801552 LK |
212 | # Compile all Lisp files, but don't recompile those that are up to |
213 | # date. Some files don't actually get compiled because they set the | |
214 | # local variable no-byte-compile. | |
7bbaaedd | 215 | |
8f801552 LK |
216 | # All .elc files are made writable before compilation in case we |
217 | # checked out read-only (CVS option -r). Files MUST be compiled one by | |
218 | # one. If we compile several files in a row we can't make sure that | |
219 | # the compilation environment is clean. We also set the load-path of | |
220 | # the Emacs used for compilation to the current directory and its | |
221 | # subdirectories, to make sure require's and load's in the files being | |
222 | # compiled find the right files. | |
7bbaaedd AI |
223 | |
224 | # Need separate version for sh and native cmd.exe | |
bad197f0 | 225 | compile: $(lisp)/subdirs.el mh-autoloads compile-$(SHELLTYPE) doit |
7bbaaedd | 226 | |
d198b6f5 | 227 | compile-CMD: |
80bb1e21 JR |
228 | # -for %%f in ($(lisp) $(WINS)) do for %%g in (%%f\*.elc) do @attrib -r %%g |
229 | for %%f in ($(COMPILE_FIRST)) do \ | |
8b9a5623 | 230 | $(emacs) -l loaddefs $(BYTE_COMPILE_EXTRA_FLAGS) -f batch-byte-compile-if-not-done %%f |
80bb1e21 | 231 | for %%f in (. $(WINS)) do for %%g in (%%f/*.el) do \ |
8b9a5623 | 232 | $(emacs) -l loaddefs $(BYTE_COMPILE_EXTRA_FLAGS) -f batch-byte-compile-if-not-done %%f/%%g |
0702b995 | 233 | |
d198b6f5 | 234 | compile-SH: |
9b006cb2 AI |
235 | # for elc in $(lisp)/*.elc $(lisp)/*/*.elc; do attrib -r $$elc; done |
236 | for el in $(COMPILE_FIRST); do \ | |
237 | echo Compiling $$el; \ | |
8b9a5623 | 238 | $(emacs) -l loaddefs $(BYTE_COMPILE_EXTRA_FLAGS) -f batch-byte-compile-if-not-done $$el; \ |
9b006cb2 AI |
239 | done |
240 | for dir in $(lisp) $(WINS); do \ | |
241 | for el in $$dir/*.el; do \ | |
242 | if test -f $$el; \ | |
243 | then \ | |
244 | echo Compiling $$el; \ | |
8b9a5623 | 245 | $(emacs) -l loaddefs $(BYTE_COMPILE_EXTRA_FLAGS) -f batch-byte-compile-if-not-done $$el; \ |
9b006cb2 AI |
246 | fi \ |
247 | done; \ | |
248 | done | |
249 | ||
8f801552 LK |
250 | # Compile all Lisp files. This is like `compile' but compiles files |
251 | # unconditionally. Some files don't actually get compiled because they | |
252 | # set the local variable no-byte-compile. | |
253 | ||
bad197f0 | 254 | compile-always: $(lisp)/subdirs.el compile-always-$(SHELLTYPE) doit |
9b006cb2 AI |
255 | |
256 | compile-always-CMD: | |
80bb1e21 | 257 | # -for %%f in ($(lisp) $(WINS)) do for %%g in (%%f\*.elc) do @attrib -r %%g |
8b9a5623 EZ |
258 | for %%f in ($(COMPILE_FIRST)) do $(emacs) $(BYTE_COMPILE_EXTRA_FLAGS) -f batch-byte-compile %%f |
259 | for %%f in (. $(WINS)) do for %%g in (%%f/*.el) do $(emacs) $(BYTE_COMPILE_EXTRA_FLAGS) -f batch-byte-compile %%f/%%g | |
7bbaaedd | 260 | |
9b006cb2 | 261 | compile-always-SH: |
7bbaaedd AI |
262 | # for elc in $(lisp)/*.elc $(lisp)/*/*.elc; do attrib -r $$elc; done |
263 | for el in $(COMPILE_FIRST); do \ | |
264 | echo Compiling $$el; \ | |
8b9a5623 | 265 | $(emacs) $(BYTE_COMPILE_EXTRA_FLAGS) -f batch-byte-compile $$el || exit 1; \ |
7bbaaedd AI |
266 | done |
267 | for dir in $(lisp) $(WINS); do \ | |
268 | for el in $$dir/*.el; do \ | |
269 | echo Compiling $$el; \ | |
8b9a5623 | 270 | $(emacs) $(BYTE_COMPILE_EXTRA_FLAGS) -f batch-byte-compile $$el || exit 1; \ |
7bbaaedd AI |
271 | done; \ |
272 | done | |
273 | ||
9b006cb2 AI |
274 | compile-calc: compile-calc-$(SHELLTYPE) |
275 | ||
276 | compile-calc-CMD: | |
8b9a5623 | 277 | for %%f in ($(lisp)/calc/*.el) do $(emacs) $(BYTE_COMPILE_EXTRA_FLAGS) -f batch-byte-compile %%f |
9b006cb2 | 278 | |
c45dbde8 | 279 | compile-calc-SH: |
9b006cb2 AI |
280 | for el in $(lisp)/calc/*.el; do \ |
281 | echo Compiling $$el; \ | |
8b9a5623 | 282 | $(emacs) $(BYTE_COMPILE_EXTRA_FLAGS) -f batch-byte-compile $$el || exit 1; \ |
9b006cb2 AI |
283 | done |
284 | ||
7bbaaedd AI |
285 | # Backup compiled Lisp files in elc.tar.gz. If that file already |
286 | # exists, make a backup of it. | |
287 | ||
288 | backup-compiled-files: | |
289 | -mv $(lisp)/elc.tar.gz $(lisp)/elc.tar.gz~ | |
290 | -tar czf $(lisp)/elc.tar.gz $(lisp)/*.elc $(lisp)/*/*.elc | |
291 | ||
292 | # Compile Lisp files, but save old compiled files first. | |
293 | ||
d198b6f5 | 294 | compile-after-backup: backup-compiled-files compile-always |
7bbaaedd AI |
295 | |
296 | # Recompile all Lisp files which are newer than their .elc files. | |
297 | # Note that this doesn't create .elc files. It only recompiles if an | |
298 | # .elc is present. | |
53fad1e4 EZ |
299 | # WARNING: Do NOT split the part inside $(ARGQUOTE)s into multiple lines as |
300 | # this can break with GNU Make 3.81 and later if sh.exe is used. | |
301 | recompile: mh-autoloads doit $(lisp)/progmodes/cc-mode.elc | |
302 | $(emacs) --eval $(ARGQUOTE)(batch-byte-recompile-directory 0)$(ARGQUOTE) $(lisp) | |
7bbaaedd | 303 | |
8b9a5623 EZ |
304 | # CC Mode uses a compile time macro system which causes a compile time |
305 | # dependency in cc-mode.elc on the macros in cc-langs.el and the | |
306 | # version string in cc-defs.el. | |
307 | $(lisp)/progmodes/cc-mode.elc: \ | |
308 | $(lisp)/progmodes/cc-mode.el \ | |
309 | $(lisp)/progmodes/cc-langs.el \ | |
310 | $(lisp)/progmodes/cc-defs.el | |
311 | $(emacs) $(BYTE_COMPILE_EXTRA_FLAGS) -f batch-byte-compile $(lisp)/progmodes/cc-mode.el | |
312 | ||
ba2b2673 BW |
313 | # Update MH-E internal autoloads. These are not to be confused with |
314 | # the autoloads for the MH-E entry points, which are already in | |
315 | # loaddefs.el. | |
e9b28650 | 316 | MH_E_SRC = $(lisp)/mh-e/mh-acros.el $(lisp)/mh-e/mh-alias.el \ |
3e66f07c JB |
317 | $(lisp)/mh-e/mh-buffers.el $(lisp)/mh-e/mh-compat.el \ |
318 | $(lisp)/mh-e/mh-comp.el $(lisp)/mh-e/mh-e.el \ | |
319 | $(lisp)/mh-e/mh-folder.el $(lisp)/mh-e/mh-funcs.el \ | |
320 | $(lisp)/mh-e/mh-gnus.el $(lisp)/mh-e/mh-identity.el \ | |
321 | $(lisp)/mh-e/mh-inc.el $(lisp)/mh-e/mh-junk.el \ | |
322 | $(lisp)/mh-e/mh-letter.el $(lisp)/mh-e/mh-limit.el \ | |
323 | $(lisp)/mh-e/mh-mime.el $(lisp)/mh-e/mh-print.el \ | |
324 | $(lisp)/mh-e/mh-scan.el $(lisp)/mh-e/mh-search.el \ | |
325 | $(lisp)/mh-e/mh-seq.el $(lisp)/mh-e/mh-show.el \ | |
326 | $(lisp)/mh-e/mh-speed.el $(lisp)/mh-e/mh-thread.el \ | |
327 | $(lisp)/mh-e/mh-tool-bar.el $(lisp)/mh-e/mh-utils.el \ | |
328 | $(lisp)/mh-e/mh-xface.el | |
ba2b2673 | 329 | |
43618a57 EZ |
330 | # See the commentary for autoloads above for why we use ./mh-e below |
331 | # instead of $(lisp)/mh-e. | |
ba2b2673 | 332 | mh-autoloads: $(lisp)/mh-e/mh-loaddefs.el |
e9b28650 | 333 | $(lisp)/mh-e/mh-loaddefs.el: $(MH_E_SRC) |
e3188d80 JR |
334 | $(MAKE) $(MFLAGS) pre-mh-loaddefs.el-$(SHELLTYPE) |
335 | cp pre-mh-loaddefs.el-$(SHELLTYPE) $@ | |
bad197f0 | 336 | rm pre-mh-loaddefs.el-$(SHELLTYPE) |
3152b1eb | 337 | "$(EMACS)" $(EMACSOPT) \ |
e3188d80 JR |
338 | -l autoload \ |
339 | --eval "(setq generate-autoload-cookie \";;;###mh-autoload\")" \ | |
a5f271ab | 340 | --eval "(setq find-file-suppress-same-file-warnings t)" \ |
e3188d80 | 341 | --eval "(setq make-backup-files nil)" \ |
7c417300 | 342 | -f w32-batch-update-autoloads \ |
43618a57 | 343 | "$(lisp)/mh-e/mh-loaddefs.el" ./mh-e |
e3188d80 JR |
344 | |
345 | pre-mh-loaddefs.el-SH: | |
ba2b2673 BW |
346 | echo ";;; mh-loaddefs.el --- automatically extracted autoloads" > $@ |
347 | echo ";;" >> $@ | |
409cc4a3 | 348 | echo ";; Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc." >> $@ |
53fad1e4 EZ |
349 | echo ";; Author: Bill Wohler <wohler@newt.com>" >> $@ |
350 | echo ";; Keywords: mail" >> $@ | |
ba2b2673 BW |
351 | echo ";;; Commentary:" >> $@ |
352 | echo ";;; Change Log:" >> $@ | |
353 | echo ";;; Code:" >> $@ | |
ba2b2673 BW |
354 | echo "\f" >> $@ |
355 | echo "(provide 'mh-loaddefs)" >> $@ | |
53fad1e4 EZ |
356 | echo ";; Local Variables:" >> $@ |
357 | echo ";; version-control: never" >> $@ | |
358 | echo ";; no-byte-compile: t" >> $@ | |
359 | echo ";; no-update-autoloads: t" >> $@ | |
360 | echo ";; End:" >> $@ | |
ba2b2673 BW |
361 | echo ";;; mh-loaddefs.el ends here" >> $@ |
362 | ||
e3188d80 JR |
363 | pre-mh-loaddefs.el-CMD: |
364 | echo ;;; mh-loaddefs.el --- automatically extracted autoloads> $@ | |
365 | echo ;;>> $@ | |
409cc4a3 | 366 | echo ;; Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.>> $@ |
53fad1e4 EZ |
367 | echo ;; Author: Bill Wohler (wohler@newt.com)>> $@ |
368 | echo ;; Keywords: mail>> $@ | |
e3188d80 JR |
369 | echo ;;; Commentary:>> $@ |
370 | echo ;;; Change Log:>> $@ | |
371 | echo ;;; Code:>> $@ | |
372 | echo.\f>> $@ | |
373 | echo (provide 'mh-loaddefs)>> $@ | |
53fad1e4 EZ |
374 | echo ;; Local Variables:>> $@ |
375 | echo ;; version-control: never>> $@ | |
376 | echo ;; no-byte-compile: t>> $@ | |
377 | echo ;; no-update-autoloads: t>> $@ | |
378 | echo ;; End:>> $@ | |
e3188d80 JR |
379 | echo ;;; mh-loaddefs.el ends here>> $@ |
380 | ||
54ab09c4 MB |
381 | # Prepare a bootstrap in the lisp subdirectory. |
382 | # | |
e8dbbf6f EZ |
383 | # Build loaddefs.el to make sure it's up-to-date. If it's not, that |
384 | # might lead to errors during the bootstrap because something fails to | |
385 | # autoload as expected. If there is no emacs binary, then we can't | |
386 | # build autoloads yet. In that case we have to use ldefs-boot.el; | |
387 | # bootstrap should always work with ldefs-boot.el. (Because | |
388 | # loaddefs.el is an automatically generated file, we don't want to | |
389 | # store it in the source repository). | |
54ab09c4 MB |
390 | # |
391 | # Remove compiled Lisp files so that bootstrap-emacs will be built from | |
392 | # sources only. | |
7bbaaedd AI |
393 | |
394 | # Need separate version for sh and native cmd.exe | |
512dd711 EZ |
395 | # Note that bootstrap-clean-$(SHELLTYPE) copies ldefs-boot.el to loaddefs.el, |
396 | # and thus the almost-empty loaddefs.el crafted by the $(lisp)/loaddefs.el | |
397 | # target can NOT be built _after_ bootstrap-clean-$(SHELLTYPE) does its | |
398 | # thing, or else an empty loaddefs.el will overwrite the full one. | |
399 | bootstrap-clean: $(lisp)/loaddefs.el | |
400 | $(MAKE) $(MFLAGS) bootstrap-clean-$(SHELLTYPE) | |
7bbaaedd AI |
401 | |
402 | bootstrap-clean-CMD: | |
3152b1eb | 403 | # if exist "$(EMACS)" $(MAKE) $(MFLAGS) autoloads |
e8dbbf6f | 404 | cp $(lisp)/ldefs-boot.el $(lisp)/loaddefs.el |
80bb1e21 | 405 | -for %%f in (. $(WINS)) do for %%g in (%%f\*.elc) do @$(DEL) %%g |
7bbaaedd AI |
406 | |
407 | bootstrap-clean-SH: | |
3152b1eb | 408 | # if test -f "$(EMACS)"; then $(MAKE) $(MFLAGS) autoloads; fi |
a3599c30 | 409 | # -rm -f $(lisp)/*.elc $(lisp)/*/*.elc |
e8dbbf6f | 410 | cp $(lisp)/ldefs-boot.el $(lisp)/loaddefs.el |
a3599c30 | 411 | -for dir in . $(WINS); do rm -f $$dir/*.elc; done |
7bbaaedd AI |
412 | |
413 | # Generate/update files for the bootstrap process. | |
014b37b6 EZ |
414 | # When done, remove bootstrap-emacs from ../bin, so that |
415 | # it will not be mistaken for an installed binary. | |
7bbaaedd | 416 | |
ba2b2673 | 417 | bootstrap: update-subdirs autoloads mh-autoloads compile finder-data custom-deps |
3152b1eb | 418 | - $(DEL) "$(EMACS)" |
7bbaaedd AI |
419 | |
420 | # | |
421 | # Assuming INSTALL_DIR is defined, copy the elisp files to it | |
422 | # Windows 95 makes this harder than it should be. | |
423 | # | |
424 | install: | |
425 | - mkdir "$(INSTALL_DIR)/lisp" | |
426 | - $(DEL) ../same-dir.tst | |
427 | - $(DEL) "$(INSTALL_DIR)/same-dir.tst" | |
428 | echo SameDirTest > "$(INSTALL_DIR)/same-dir.tst" | |
429 | #ifdef COPY_LISP_SOURCE | |
564a3032 | 430 | $(IFNOTSAMEDIR) $(MAKE) $(MFLAGS) install-lisp-$(SHELLTYPE) $(ENDIF) |
7bbaaedd AI |
431 | #else |
432 | # $(IFNOTSAMEDIR) $(CP_DIR) *.elc "$(INSTALL_DIR)/lisp" $(ENDIF) | |
433 | # $(IFNOTSAMEDIR) $(CP) cus-load.el "$(INSTALL_DIR)/lisp" $(ENDIF) | |
434 | # $(IFNOTSAMEDIR) $(CP) forms*.el "$(INSTALL_DIR)/lisp" $(ENDIF) | |
435 | # $(IFNOTSAMEDIR) $(CP) patcomp.el "$(INSTALL_DIR)/lisp" $(ENDIF) | |
436 | # $(IFNOTSAMEDIR) $(CP) subdirs.el "$(INSTALL_DIR)/lisp" $(ENDIF) | |
437 | # $(IFNOTSAMEDIR) $(CP) version.el "$(INSTALL_DIR)/lisp" $(ENDIF) | |
438 | # $(IFNOTSAMEDIR) $(CP) mail/blessmail.el "$(INSTALL_DIR)/lisp/mail" $(ENDIF) | |
439 | # $(IFNOTSAMEDIR) $(CP) mail/sc.el "$(INSTALL_DIR)/lisp/mail" $(ENDIF) | |
440 | # $(IFNOTSAMEDIR) $(CP) play/bruce.el "$(INSTALL_DIR)/lisp/play" $(ENDIF) | |
441 | # $(IFNOTSAMEDIR) $(CP) international/latin-*.el "$(INSTALL_DIR)/lisp/international" $(ENDIF) | |
442 | # $(IFNOTSAMEDIR) $(CP) international/mule-conf.el "$(INSTALL_DIR)/lisp/international" $(ENDIF) | |
443 | #endif | |
444 | - $(DEL) ../same-dir.tst | |
445 | - $(DEL) "$(INSTALL_DIR)/same-dir.tst" | |
446 | ||
564a3032 EZ |
447 | # Need to copy *.el files first, to avoid "source file is newer" annoyance |
448 | # since cp does not preserve time stamps | |
449 | install-lisp-SH: | |
450 | cp -f *.el "$(INSTALL_DIR)/lisp" | |
ec9bbc6c EZ |
451 | for dir in $(WINS); do [ -d "$(INSTALL_DIR)/lisp/$$dir" ] || mkdir "$(INSTALL_DIR)/lisp/$$dir"; done |
452 | for dir in $(WINS); do cp -f $$dir/*.el "$(INSTALL_DIR)/lisp/$$dir"; done | |
564a3032 EZ |
453 | for dir in . $(WINS); do cp $$dir/*.elc "$(INSTALL_DIR)/lisp/$$dir"; done |
454 | ||
455 | install-lisp-CMD: | |
456 | cp -f *.el "$(INSTALL_DIR)/lisp" | |
ec9bbc6c | 457 | for %%f in ($(WINS)) do if not exist "$(INSTALL_DIR)/lisp/%%f" mkdir "$(INSTALL_DIR)/lisp/%%f" |
564a3032 EZ |
458 | for %%f in ($(WINS)) do cp -f %%f/*.el "$(INSTALL_DIR)/lisp/%%f" |
459 | for %%f in (. $(WINS)) do cp -f %%f/*.elc "$(INSTALL_DIR)/lisp/%%f" | |
460 | ||
8b9a5623 EZ |
461 | # WARNING: Do NOT split the part inside $(ARGQUOTE)s into multiple lines as |
462 | # this can break with GNU Make 3.81 and later if sh.exe is used. | |
463 | check-declare: | |
464 | $(emacs) -l $(lisp)/emacs-lisp/check-declare --eval $(ARGQUOTE)(check-declare-directory $(DQUOTE)$(lisp)$(DQUOTE))$(ARGQUOTE) | |
465 | ||
7bbaaedd AI |
466 | # |
467 | # Maintenance | |
c45dbde8 | 468 | # |
a055c272 EZ |
469 | # We used to delete *~ here, but that might inadvertently remove |
470 | # precious files if it happens to match their short 8+3 aliases. | |
7bbaaedd | 471 | clean: |
a055c272 | 472 | - $(DEL) *.el~ |