]> code.delx.au - gnu-emacs/blob - lisp/makefile.w32-in
Removed the various "echo." lines from lisp\makefile.w32-in and nt\makefile.w32-in.
[gnu-emacs] / lisp / makefile.w32-in
1 # -*- Makefile -*- for GNU Emacs on the Microsoft W32 API.
2 # Copyright (c) 2000,2001,2004 Free Software Foundation, Inc.
3 #
4 # This file is part of GNU Emacs.
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 2, or (at your option)
9 # 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; see the file COPYING. If not, write to the
18 # Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19 # Boston, MA 02111-1307, USA.
20 #
21
22 ALL =
23
24 all: $(ALL)
25
26 SQUOTE='
27 # '
28
29 lisp = $(CURDIR)
30 srcdir = $(CURDIR)/..
31
32 # You can specify a different executable on the make command line,
33 # e.g. "make EMACS=../src/emacs ...".
34
35 EMACS = "$(THISDIR)/../bin/emacs.exe"
36
37 # Command line flags for Emacs. This must include --multibyte,
38 # otherwise some files will not compile.
39
40 EMACSOPT = -batch --no-init-file --no-site-file --multibyte
41
42 # Set EMACSLOADPATH correctly (already defined in environment).
43 EMACSLOADPATH=$(lisp)
44
45 lisptagsfiles1 = $(lisp)/*.el
46 lisptagsfiles2 = $(lisp)/*/*.el
47 ETAGS = "../lib-src/$(BLD)/etags"
48
49 # Files which should not be compiled. If you change the name `DONTCOMPILE'
50 # to something different, you'll have to change make-dist as well, and
51 # modify the lists in $lisp and $shortlisp on src/Makefile.in.
52 #
53 # - emacs-lisp/cl-specs.el: only contains `def-edebug-spec's so there's
54 # no point compiling it, although it doesn't hurt.
55
56 DONTCOMPILE = \
57 $(lisp)/cus-load.el \
58 $(lisp)/emacs-lisp/cl-specs.el \
59 $(lisp)/eshell/esh-maint.el \
60 $(lisp)/eshell/esh-groups.el \
61 $(lisp)/finder-inf.el \
62 $(lisp)/forms-d2.el \
63 $(lisp)/forms-pass.el \
64 $(lisp)/generic-x.el \
65 $(lisp)/international/latin-1.el \
66 $(lisp)/international/latin-2.el \
67 $(lisp)/international/latin-3.el \
68 $(lisp)/international/latin-4.el \
69 $(lisp)/international/latin-5.el \
70 $(lisp)/international/latin-8.el \
71 $(lisp)/international/latin-9.el \
72 $(lisp)/international/mule-conf.el \
73 $(lisp)/language/czech.el \
74 $(lisp)/language/devanagari.el \
75 $(lisp)/language/kannada.el \
76 $(lisp)/language/malayalam.el \
77 $(lisp)/language/tamil.el \
78 $(lisp)/language/english.el \
79 $(lisp)/language/greek.el \
80 $(lisp)/language/hebrew.el \
81 $(lisp)/language/japanese.el \
82 $(lisp)/language/korean.el \
83 $(lisp)/language/lao.el \
84 $(lisp)/language/misc-lang.el \
85 $(lisp)/language/romanian.el \
86 $(lisp)/language/slovak.el \
87 $(lisp)/language/thai.el \
88 $(lisp)/language/utf-8-lang.el \
89 $(lisp)/language/georgian.el \
90 $(lisp)/loaddefs.el \
91 $(lisp)/ldefs-boot.el \
92 $(lisp)/loadup.el \
93 $(lisp)/mail/blessmail.el \
94 $(lisp)/patcomp.el \
95 $(lisp)/paths.el \
96 $(lisp)/play/bruce.el \
97 $(lisp)/subdirs.el \
98 $(lisp)/term/internal.el \
99 $(lisp)/term/AT386.el \
100 $(lisp)/term/apollo.el \
101 $(lisp)/term/bobcat.el \
102 $(lisp)/term/iris-ansi.el \
103 $(lisp)/term/keyswap.el \
104 $(lisp)/term/linux.el \
105 $(lisp)/term/lk201.el \
106 $(lisp)/term/news.el \
107 $(lisp)/term/vt102.el \
108 $(lisp)/term/vt125.el \
109 $(lisp)/term/vt200.el \
110 $(lisp)/term/vt201.el \
111 $(lisp)/term/vt220.el \
112 $(lisp)/term/vt240.el \
113 $(lisp)/term/vt300.el \
114 $(lisp)/term/vt320.el \
115 $(lisp)/term/vt400.el \
116 $(lisp)/term/vt420.el \
117 $(lisp)/term/wyse50.el \
118 $(lisp)/version.el
119
120 # Files to compile before others during a bootstrap. This is done to
121 # speed up the bootstrap process. The CC files are compiled first
122 # because CC mode tweaks the compilation process, and requiring
123 # cc-mode when it is not compiled doesn't work during the
124 # bootstrapping.
125
126 COMPILE_FIRST = \
127 $(lisp)/emacs-lisp/byte-opt.el \
128 $(lisp)/emacs-lisp/bytecomp.el \
129 $(lisp)/subr.el \
130 $(lisp)/progmodes/cc-mode.el \
131 $(lisp)/progmodes/cc-vars.el
132
133 # The actual Emacs command run in the targets below.
134
135 emacs = $(EMACS) $(EMACSOPT)
136
137 # Common command to find subdirectories
138
139 setwins=subdirs=`find $$wd -type d -print`; \
140 for file in $$subdirs; do \
141 case $$file in */Old | */RCS | */CVS | */CVS/* | */=* ) ;; \
142 *) wins="$$wins $$file" ;; \
143 esac; \
144 done
145
146 # Have to define the list of subdirs manually when not using sh.
147 WINS=\
148 calc \
149 calendar \
150 emacs-lisp \
151 emulation \
152 eshell \
153 gnus \
154 international \
155 language \
156 mail \
157 mh-e \
158 net \
159 obsolete \
160 play \
161 progmodes \
162 term \
163 textmodes \
164 toolbar \
165 url
166
167 doit:
168
169 cus-load.el:
170 touch $@
171 custom-deps: cus-load.el doit
172 @echo Directories: $(WINS)
173 -$(emacs) -l cus-dep --eval $(ARGQUOTE)(setq find-file-hooks nil)$(ARGQUOTE) -f custom-make-dependencies $(lisp) $(WINS)
174
175 finder-data: doit
176 @echo Directories: $(WINS)
177 $(emacs) -l finder -f finder-compile-keywords-make-dist $(lisp) $(WINS)
178
179 loaddefs.el:
180 $(MAKE) $(MFLAGS) loaddefs.el-$(SHELLTYPE)
181 cp loaddefs.el-$(SHELLTYPE) $@
182 rm loaddefs.el-$(SHELLTYPE)
183
184 loaddefs.el-SH:
185 echo ";;; loaddefs.el --- automatically extracted autoloads" > $@
186 echo ";;" >> $@; echo ";;; Code:" >> $@
187 echo "(autoload 'define-minor-mode \"easy-mmode\")" >>$@
188 echo "(autoload 'define-ccl-program \"ccl\")" >>$@
189 echo "(autoload 'regexp-opt \"regexp-opt\")" >>$@
190 echo "(autoload 'string-to-list \"mule-util\")" >>$@
191 echo "(autoload 'define-derived-mode \"derived\")" >>$@
192 echo "(autoload 'encoded-kbd-mode \"encoded-kb\")" >>$@
193 echo "(defvar cvs-global-menu nil)" >>$@
194 echo "\f" >> $@
195 echo ";;; Local Variables:" >> $@
196 echo ";;; version-control: never" >> $@
197 echo ";;; no-byte-compile: t" >> $@
198 echo ";;; no-update-autoloads: t" >> $@
199 echo ";;; End:" >> $@
200 echo ";;; loaddefs.el ends here" >> $@
201
202 loaddefs.el-CMD:
203 echo ;;; loaddefs.el --- automatically extracted autoloads> $@
204 echo ;;; Code:>> $@
205 echo (autoload 'define-minor-mode "easy-mmode")>> $@
206 echo (autoload 'define-ccl-program "ccl")>> $@
207 echo (autoload 'regexp-opt "regexp-opt")>> $@
208 echo (autoload 'string-to-list "mule-util")>> $@
209 echo (autoload 'define-derived-mode "derived")>> $@
210 echo (autoload 'encoded-kbd-mode "encoded-kb")>> $@
211 echo (defvar cvs-global-menu nil)>> $@
212 echo ;;; >> $@
213 echo ;;; Local Variables:>> $@
214 echo ;;; version-control: never>> $@
215 echo ;;; no-byte-compile: t>> $@
216 echo ;;; no-update-autoloads: t>> $@
217 echo ;;; End:>> $@
218 echo ;;; loaddefs.el ends here>> $@
219
220 autoloads: loaddefs.el doit
221 @echo Directories: $(WINS)
222 $(emacs) -l autoload \
223 --eval $(ARGQUOTE)(setq find-file-hooks nil \
224 find-file-suppress-same-file-warnings t \
225 generated-autoload-file \
226 $(DQUOTE)$(lisp)/loaddefs.el$(DQUOTE))$(ARGQUOTE) \
227 -f batch-update-autoloads $(lisp) $(WINS)
228
229 subdirs.el:
230 $(MAKE) $(MFLAGS) update-subdirs
231
232 # Need separate version for sh and native cmd.exe
233 update-subdirs: update-subdirs-$(SHELLTYPE)
234
235 update-subdirs-CMD: doit
236 echo ;; -*- no-byte-compile: t -*->subdirs.el
237 echo ;; In load-path, after this directory should come>> subdirs.el
238 echo ;; certain of its subdirectories. Here we specify them.>> subdirs.el
239 echo (normal-top-level-add-to-load-path $(SQUOTE)(>> subdirs.el
240 @for %%d in ($(WINS)) do if not (%%d)==(term) echo "%%d">> subdirs.el
241 echo ))>> subdirs.el
242
243 update-subdirs-SH: doit
244 $(srcdir)/update-subdirs $(lisp); \
245 for file in $(WINS); do \
246 $(srcdir)/update-subdirs $$file; \
247 done;
248
249 updates: update-subdirs autoloads finder-data custom-deps
250
251 # Update the AUTHORS file.
252
253 update-authors:
254 $(emacs) -f batch-update-authors $(srcdir)/AUTHORS $(srcdir)
255
256 TAGS: $(lisptagsfiles1) $(lisptagsfiles2)
257 $(ETAGS) $(lisptagsfiles1) $(lisptagsfiles2)
258
259 TAGS-LISP: $(lisptagsfiles1) $(lisptagsfiles2)
260 $(ETAGS) -o TAGS-LISP $(lisptagsfiles1) $(lisptagsfiles2)
261
262 .SUFFIXES: .elc .el
263
264 .el.elc:
265 -$(emacs) -f batch-byte-compile $<
266
267 $(DONTCOMPILE:.el=.elc):
268 -$(DEL) $@
269
270 # Compile all Lisp files, except those from DONTCOMPILE,
271 # but don't recompile those that are up to date.
272
273 # All .elc files are made writable
274 # before compilation in case we checked out read-only (CVS option -r).
275 # Files MUST be compiled one by one. If we compile several files in a
276 # row we can't make sure that the compilation environment is clean.
277 # We also set the load-path of the Emacs used for compilation to the
278 # current directory and its subdirectories, to make sure require's and
279 # load's in the files being compiled find the right files.
280
281 # Need separate version for sh and native cmd.exe
282 compile: subdirs.el compile-$(SHELLTYPE) doit
283
284 compile-CMD:
285 # -for %%f in ($(lisp) $(WINS)) do for %%g in (%%f\*.elc) do @attrib -r %%g
286 for %%f in ($(COMPILE_FIRST)) do \
287 $(emacs) -l loaddefs -f batch-byte-compile-if-not-done %%f
288 for %%f in (. $(WINS)) do for %%g in (%%f/*.el) do \
289 $(emacs) -l loaddefs -f batch-byte-compile-if-not-done %%f/%%g
290
291 compile-SH:
292 # for elc in $(lisp)/*.elc $(lisp)/*/*.elc; do attrib -r $$elc; done
293 for el in $(COMPILE_FIRST); do \
294 echo Compiling $$el; \
295 $(emacs) -l loaddefs -f batch-byte-compile-if-not-done $$el; \
296 done
297 for dir in $(lisp) $(WINS); do \
298 for el in $$dir/*.el; do \
299 if test -f $$el; \
300 then \
301 echo Compiling $$el; \
302 $(emacs) -l loaddefs -f batch-byte-compile-if-not-done $$el; \
303 fi \
304 done; \
305 done
306
307 # Compile all Lisp files, except those from DONTCOMPILE. This
308 # is like `compile' but compiles files unconditionally.
309 compile-always: subdirs.el compile-always-$(SHELLTYPE) doit
310
311 compile-always-CMD:
312 # -for %%f in ($(lisp) $(WINS)) do for %%g in (%%f\*.elc) do @attrib -r %%g
313 for %%f in ($(COMPILE_FIRST)) do $(emacs) -f batch-byte-compile %%f
314 for %%f in (. $(WINS)) do for %%g in (%%f/*.el) do $(emacs) -f batch-byte-compile %%f/%%g
315
316 compile-always-SH:
317 # for elc in $(lisp)/*.elc $(lisp)/*/*.elc; do attrib -r $$elc; done
318 for el in $(COMPILE_FIRST); do \
319 echo Compiling $$el; \
320 $(emacs) -f batch-byte-compile $$el || exit 1; \
321 done
322 for dir in $(lisp) $(WINS); do \
323 for el in $$dir/*.el; do \
324 echo Compiling $$el; \
325 $(emacs) -f batch-byte-compile $$el || exit 1; \
326 done; \
327 done
328
329 compile-calc: compile-calc-$(SHELLTYPE)
330
331 compile-calc-CMD:
332 for %%f in ($(lisp)/calc/*.el) do $(emacs) -f batch-byte-compile %%f
333
334 compile-calc-SH:
335 for el in $(lisp)/calc/*.el; do \
336 echo Compiling $$el; \
337 $(emacs) -f batch-byte-compile $$el || exit 1; \
338 done
339
340 # Backup compiled Lisp files in elc.tar.gz. If that file already
341 # exists, make a backup of it.
342
343 backup-compiled-files:
344 -mv $(lisp)/elc.tar.gz $(lisp)/elc.tar.gz~
345 -tar czf $(lisp)/elc.tar.gz $(lisp)/*.elc $(lisp)/*/*.elc
346
347 # Compile Lisp files, but save old compiled files first.
348
349 compile-after-backup: backup-compiled-files compile-always
350
351 # Recompile all Lisp files which are newer than their .elc files.
352 # Note that this doesn't create .elc files. It only recompiles if an
353 # .elc is present.
354
355 recompile: doit
356 $(emacs) -f batch-byte-recompile-directory $(lisp)
357
358 # Prepare a bootstrap in the lisp subdirectory.
359 #
360 # Build loaddefs.el, because it's not sure it's up-to-date, and if it's not,
361 # that might lead to errors during the bootstrap because something fails to
362 # autoload as expected. However, if there is no emacs binary, then we can't
363 # build autoloads yet, so just make sure there's some loaddefs.el file, as
364 # it's necessary for generating the binary (because loaddefs.el is an
365 # automatically generated file, we don't want to store it in the source
366 # repository).
367 #
368 # Remove compiled Lisp files so that bootstrap-emacs will be built from
369 # sources only.
370
371 # Need separate version for sh and native cmd.exe
372 bootstrap-clean: bootstrap-clean-$(SHELLTYPE) loaddefs.el
373
374 bootstrap-clean-CMD:
375 # if exist $(EMACS) $(MAKE) $(MFLAGS) autoloads
376 if not exist $(lisp)\loaddefs.el cp $(lisp)/ldefs-boot.el $(lisp)/loaddefs.el
377 -for %%f in (. $(WINS)) do for %%g in (%%f\*.elc) do @$(DEL) %%g
378
379 bootstrap-clean-SH:
380 # if test -f $(EMACS); then $(MAKE) $(MFLAGS) autoloads; fi
381 # -rm -f $(lisp)/*.elc $(lisp)/*/*.elc
382 if ! test -r $(lisp)/loaddefs.el; then \
383 cp $(lisp)/ldefs-boot.el $(lisp)/loaddefs.el; \
384 fi
385 -for dir in . $(WINS); do rm -f $$dir/*.elc; done
386
387 # Generate/update files for the bootstrap process.
388
389 bootstrap: update-subdirs autoloads compile finder-data custom-deps
390
391 #
392 # Assuming INSTALL_DIR is defined, copy the elisp files to it
393 # Windows 95 makes this harder than it should be.
394 #
395 install:
396 - mkdir "$(INSTALL_DIR)/lisp"
397 - $(DEL) ../same-dir.tst
398 - $(DEL) "$(INSTALL_DIR)/same-dir.tst"
399 echo SameDirTest > "$(INSTALL_DIR)/same-dir.tst"
400 #ifdef COPY_LISP_SOURCE
401 $(IFNOTSAMEDIR) $(CP_DIR) . "$(INSTALL_DIR)/lisp" $(ENDIF)
402 #else
403 # $(IFNOTSAMEDIR) $(CP_DIR) *.elc "$(INSTALL_DIR)/lisp" $(ENDIF)
404 # $(IFNOTSAMEDIR) $(CP) cus-load.el "$(INSTALL_DIR)/lisp" $(ENDIF)
405 # $(IFNOTSAMEDIR) $(CP) forms*.el "$(INSTALL_DIR)/lisp" $(ENDIF)
406 # $(IFNOTSAMEDIR) $(CP) patcomp.el "$(INSTALL_DIR)/lisp" $(ENDIF)
407 # $(IFNOTSAMEDIR) $(CP) subdirs.el "$(INSTALL_DIR)/lisp" $(ENDIF)
408 # $(IFNOTSAMEDIR) $(CP) version.el "$(INSTALL_DIR)/lisp" $(ENDIF)
409 # $(IFNOTSAMEDIR) $(CP) mail/blessmail.el "$(INSTALL_DIR)/lisp/mail" $(ENDIF)
410 # $(IFNOTSAMEDIR) $(CP) mail/sc.el "$(INSTALL_DIR)/lisp/mail" $(ENDIF)
411 # $(IFNOTSAMEDIR) $(CP) play/bruce.el "$(INSTALL_DIR)/lisp/play" $(ENDIF)
412 # $(IFNOTSAMEDIR) $(CP) international/latin-*.el "$(INSTALL_DIR)/lisp/international" $(ENDIF)
413 # $(IFNOTSAMEDIR) $(CP) international/mule-conf.el "$(INSTALL_DIR)/lisp/international" $(ENDIF)
414 #endif
415 - $(DEL) ../same-dir.tst
416 - $(DEL) "$(INSTALL_DIR)/same-dir.tst"
417
418 #
419 # Maintenance
420 #
421 clean:
422 - $(DEL) *~