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