(calcDigit-key): Use minibuffer-prompt-end instead of point-min.
[bpt/emacs.git] / lisp / makefile.w32-in
CommitLineData
53b67fa0
AI
1# Makefile for GNU Emacs on the Microsoft W32 API.
2# Copyright (c) 2000-2001 Free Software Foundation, Inc.
7bbaaedd
AI
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
22ALL =
23
24all: $(ALL)
25
26SQUOTE='
27# '
28
6610f4b2 29lisp = $(CURDIR)
7bbaaedd
AI
30
31# You can specify a different executable on the make command line,
32# e.g. "make EMACS=../src/emacs ...".
33
587b5737 34EMACS = "$(THISDIR)/../bin/emacs.exe"
7bbaaedd
AI
35
36# Command line flags for Emacs. This must include --multibyte,
37# otherwise some files will not compile.
38
39EMACSOPT = -batch --no-init-file --no-site-file --multibyte
40
cc7aa053
AI
41# Set EMACSLOADPATH correctly (already defined in environment).
42EMACSLOADPATH=$(lisp)
43
7bbaaedd
AI
44lisptagsfiles1 = $(lisp)/*.el
45lisptagsfiles2 = $(lisp)/*/*.el
46ETAGS = "../lib-src/$(BLD)/etags"
47
48# Files which should not be compiled.
49# - emacs-lisp/cl-specs.el: only contains `def-edebug-spec's so there's
50# no point compiling it, although it doesn't hurt.
51
52DONTCOMPILE = \
7bbaaedd
AI
53 $(lisp)/cus-load.el \
54 $(lisp)/cus-start.el \
55 $(lisp)/emacs-lisp/cl-specs.el \
56 $(lisp)/eshell/esh-maint.el \
57 $(lisp)/eshell/esh-groups.el \
58 $(lisp)/finder-inf.el \
59 $(lisp)/forms-d2.el \
60 $(lisp)/forms-pass.el \
61 $(lisp)/generic-x.el \
62 $(lisp)/international/latin-1.el \
63 $(lisp)/international/latin-2.el \
64 $(lisp)/international/latin-3.el \
65 $(lisp)/international/latin-4.el \
66 $(lisp)/international/latin-5.el \
67 $(lisp)/international/latin-8.el \
68 $(lisp)/international/latin-9.el \
69 $(lisp)/international/mule-conf.el \
70 $(lisp)/loaddefs.el \
71 $(lisp)/loadup.el \
72 $(lisp)/mail/blessmail.el \
7bbaaedd
AI
73 $(lisp)/patcomp.el \
74 $(lisp)/paths.el \
75 $(lisp)/play/bruce.el \
76 $(lisp)/subdirs.el \
77 $(lisp)/term/internal.el \
6c317bd2
GM
78 $(lisp)/term/AT386.el \
79 $(lisp)/term/apollo.el \
80 $(lisp)/term/bobcat.el \
81 $(lisp)/term/iris-ansi.el \
82 $(lisp)/term/keyswap.el \
83 $(lisp)/term/linux.el \
84 $(lisp)/term/lk201.el \
85 $(lisp)/term/news.el \
86 $(lisp)/term/vt102.el \
87 $(lisp)/term/vt125.el \
88 $(lisp)/term/vt200.el \
89 $(lisp)/term/vt201.el \
90 $(lisp)/term/vt220.el \
91 $(lisp)/term/vt240.el \
92 $(lisp)/term/vt300.el \
93 $(lisp)/term/vt320.el \
94 $(lisp)/term/vt400.el \
95 $(lisp)/term/vt420.el \
96 $(lisp)/term/wyse50.el \
97 $(lisp)/term/xterm.el \
7bbaaedd
AI
98 $(lisp)/version.el
99
170a9e70
GM
100# Files to compile before others during a bootstrap. This is done to
101# speed up the bootstrap process. The CC files are compiled first
102# because CC mode tweaks the compilation process, and requiring
103# cc-mode when it is not compiled doesn't work during the
104# bootstrapping.
7bbaaedd
AI
105
106COMPILE_FIRST = \
107 $(lisp)/emacs-lisp/byte-opt.el \
108 $(lisp)/emacs-lisp/bytecomp.el \
170a9e70
GM
109 $(lisp)/subr.el \
110 $(lisp)/progmodes/cc-mode.el \
111 $(lisp)/progmodes/cc-vars.el
7bbaaedd
AI
112
113# The actual Emacs command run in the targets below.
114
115emacs = $(EMACS) $(EMACSOPT)
116
117# Common command to find subdirectories
118
119setwins=subdirs=`find $$wd -type d -print`; \
120 for file in $$subdirs; do \
121 case $$file in */Old | */RCS | */CVS | */CVS/* | */=* ) ;; \
122 *) wins="$$wins $$file" ;; \
123 esac; \
124 done
125
126# Have to define the list of subdirs manually when not using sh.
127WINS=\
128 calendar \
129 emacs-lisp \
130 emulation \
131 eshell \
132 gnus \
133 international \
134 language \
135 mail \
136 net \
137 play \
138 progmodes \
139 term \
140 textmodes
141
142doit:
143
144cus-load.el:
145 touch $@
146custom-deps: cus-load.el doit
147 @echo Directories: $(WINS)
cc7aa053 148 -$(emacs) -l cus-dep --eval $(ARGQUOTE)(setq find-file-hooks nil)$(ARGQUOTE) -f custom-make-dependencies $(lisp) $(WINS)
7bbaaedd
AI
149
150finder-inf.el:
151 echo (provide $(SQUOTE)finder-inf)>> $@
152
153finder-data: finder-inf.el doit
154 @echo Directories: $(WINS)
155 $(emacs) -l finder -f finder-compile-keywords-make-dist $(lisp) $(WINS)
156
157loaddefs.el:
158 echo ;;; loaddefs.el --- automatically extracted autoloads> $@
159 echo ;;; Code:>> $@
160 echo \f>> $@
161 echo ;;; Local Variables:>> $@
162 echo ;;; version-control: never>> $@
163 echo ;;; no-byte-compile: t>> $@
164 echo ;;; no-update-autoloads: t>> $@
165 echo ;;; End:>> $@
166 echo ;;; loaddefs.el ends here>> $@
167
168autoloads: loaddefs.el doit
169 @echo Directories: $(WINS)
c5bdb93d
AI
170 $(emacs) -l autoload \
171 --eval $(ARGQUOTE)(setq find-file-hooks nil \
172 find-file-suppress-same-file-warnings t \
173 generated-autoload-file \
174 $(DQUOTE)$(lisp)/loaddefs.el$(DQUOTE))$(ARGQUOTE) \
175 -f batch-update-autoloads $(lisp) $(WINS)
7bbaaedd
AI
176
177subdirs.el:
178 $(MAKE) $(MFLAGS) update-subdirs
179
180# Need separate version for sh and native cmd.exe
181update-subdirs: update-subdirs-$(SHELLTYPE)
182
183update-subdirs-CMD: doit
184 @set QWINS=
185 @for %d in ($(WINS)) do if not (%d)==(term) set QWINS=%QWINS% "%d"
186 echo ;; In load-path, after this directory should come> subdirs.el
187 echo ;; certain of its subdirectories. Here we specify them.>> subdirs.el
188 echo (normal-top-level-add-to-load-path $(SQUOTE)(%QWINS%))>> subdirs.el
189
190update-subdirs-SH: doit
191 wd=$(lisp); $(setwins); \
192 for file in $$wins; do \
193 $(srcdir)/update-subdirs $$file; \
194 done;
195
196updates: update-subdirs autoloads finder-data custom-deps
197
198TAGS: $(lisptagsfiles1) $(lisptagsfiles2)
199 $(ETAGS) $(lisptagsfiles1) $(lisptagsfiles2)
200
201TAGS-LISP: $(lispsource)$(lisptagsfiles1) $(lispsource)$(lisptagsfiles2)
202 $(ETAGS) -o TAGS-LISP $(lispsource)$(lisptagsfiles1) $(lispsource)$(lisptagsfiles2)
203
49060c51
AI
204.SUFFIXES: .elc .el
205
7bbaaedd 206.el.elc:
cc7aa053 207 -$(emacs) -f batch-byte-compile $<
7bbaaedd
AI
208
209$(DONTCOMPILE:.el=.elc):
210 -$(DEL) $@
211
212# Compile all Lisp files, except those from DONTCOMPILE. This
213# compiles files unconditionally. All .elc files are made writable
214# before compilation in case we checked out read-only (CVS option -r).
215# Files MUST be compiled one by one. If we compile several files in a
216# row we can't make sure that the compilation environment is clean.
217# We also set the load-path of the Emacs used for compilation to the
218# current directory and its subdirectories, to make sure require's and
219# load's in the files being compiled find the right files.
220
221# Need separate version for sh and native cmd.exe
222compile-files: subdirs.el compile-files-$(SHELLTYPE) doit
223
224compile-files-CMD:
202c7edc 225# -for %f in ($(lisp) $(WINS)) do for %g in (%f\*.elc) do @attrib -r %g
7bbaaedd 226 for %f in ($(COMPILE_FIRST)) do $(emacs) -f batch-byte-compile %f
c5bdb93d 227 for %f in (. $(WINS)) do for %g in (%f/*.el) do $(emacs) -f batch-byte-compile %f/%g
7bbaaedd
AI
228
229compile-files-SH:
230# for elc in $(lisp)/*.elc $(lisp)/*/*.elc; do attrib -r $$elc; done
231 for el in $(COMPILE_FIRST); do \
232 echo Compiling $$el; \
cc7aa053 233 $(emacs) -f batch-byte-compile $$el; \
7bbaaedd
AI
234 done
235 for dir in $(lisp) $(WINS); do \
236 for el in $$dir/*.el; do \
237 echo Compiling $$el; \
cc7aa053 238 $(emacs) -f batch-byte-compile $$el; \
7bbaaedd
AI
239 done; \
240 done
241
242# Backup compiled Lisp files in elc.tar.gz. If that file already
243# exists, make a backup of it.
244
245backup-compiled-files:
246 -mv $(lisp)/elc.tar.gz $(lisp)/elc.tar.gz~
247 -tar czf $(lisp)/elc.tar.gz $(lisp)/*.elc $(lisp)/*/*.elc
248
249# Compile Lisp files, but save old compiled files first.
250
251compile: backup-compiled-files compile-files
252
253# Recompile all Lisp files which are newer than their .elc files.
254# Note that this doesn't create .elc files. It only recompiles if an
255# .elc is present.
256
257recompile: doit
cc7aa053 258 $(emacs) -f batch-byte-recompile-directory .
7bbaaedd
AI
259
260# Prepare a bootstrap in the lisp subdirectory. Build loaddefs.el,
261# because it's not sure it's up-to-date, and if it's not, that might
262# lead to errors during the bootstrap because something fails to
263# autoload as expected. Remove compiled Lisp files so that
264# bootstrap-emacs will be built from sources only.
265
266# Need separate version for sh and native cmd.exe
267bootstrap-clean: bootstrap-clean-$(SHELLTYPE)
268
269bootstrap-clean-CMD:
5de7f0f7 270# if exist $(EMACS) $(MAKE) $(MFLAGS) autoloads
c5bdb93d 271 -for %f in (. $(WINS)) do for %g in (%f\*.elc) do @$(DEL) %g
7bbaaedd
AI
272
273bootstrap-clean-SH:
5de7f0f7 274# if test -f $(EMACS); then $(MAKE) $(MFLAGS) autoloads; fi
7bbaaedd
AI
275 -rm -f $(lisp)/*.elc $(lisp)/*/*.elc
276
277# Generate/update files for the bootstrap process.
278
279bootstrap: autoloads compile-files custom-deps
280
281#
282# Assuming INSTALL_DIR is defined, copy the elisp files to it
283# Windows 95 makes this harder than it should be.
284#
285install:
286 - mkdir "$(INSTALL_DIR)/lisp"
287 - $(DEL) ../same-dir.tst
288 - $(DEL) "$(INSTALL_DIR)/same-dir.tst"
289 echo SameDirTest > "$(INSTALL_DIR)/same-dir.tst"
290#ifdef COPY_LISP_SOURCE
291 $(IFNOTSAMEDIR) $(CP_DIR) . "$(INSTALL_DIR)/lisp" $(ENDIF)
292#else
293# $(IFNOTSAMEDIR) $(CP_DIR) *.elc "$(INSTALL_DIR)/lisp" $(ENDIF)
294# $(IFNOTSAMEDIR) $(CP) cus-load.el "$(INSTALL_DIR)/lisp" $(ENDIF)
295# $(IFNOTSAMEDIR) $(CP) forms*.el "$(INSTALL_DIR)/lisp" $(ENDIF)
296# $(IFNOTSAMEDIR) $(CP) patcomp.el "$(INSTALL_DIR)/lisp" $(ENDIF)
297# $(IFNOTSAMEDIR) $(CP) subdirs.el "$(INSTALL_DIR)/lisp" $(ENDIF)
298# $(IFNOTSAMEDIR) $(CP) version.el "$(INSTALL_DIR)/lisp" $(ENDIF)
299# $(IFNOTSAMEDIR) $(CP) mail/blessmail.el "$(INSTALL_DIR)/lisp/mail" $(ENDIF)
300# $(IFNOTSAMEDIR) $(CP) mail/sc.el "$(INSTALL_DIR)/lisp/mail" $(ENDIF)
301# $(IFNOTSAMEDIR) $(CP) play/bruce.el "$(INSTALL_DIR)/lisp/play" $(ENDIF)
302# $(IFNOTSAMEDIR) $(CP) international/latin-*.el "$(INSTALL_DIR)/lisp/international" $(ENDIF)
303# $(IFNOTSAMEDIR) $(CP) international/mule-conf.el "$(INSTALL_DIR)/lisp/international" $(ENDIF)
304#endif
305 - $(DEL) ../same-dir.tst
306 - $(DEL) "$(INSTALL_DIR)/same-dir.tst"
307
308#
309# Maintenance
310#
311clean:
312 - $(DEL) *~