* mh-customize.el (mh-toolbar): Rename to mh-tool-bar.
[bpt/emacs.git] / nt / makefile.w32-in
CommitLineData
bd6766d3 1# -*- Makefile -*- for GNU Emacs on the Microsoft W32 API.\r
b65d8176
TTN
2# Copyright (C) 2000, 2001, 2002, 2003, 2004,\r
3# 2005 Free Software Foundation, Inc.\r
8af54a64
AI
4#\r
5# Top level makefile for building GNU Emacs on Windows NT\r
6#\r
7# This file is part of GNU Emacs.\r
177c0ea7 8#\r
8af54a64
AI
9# GNU Emacs is free software; you can redistribute it and/or modify\r
10# it under the terms of the GNU General Public License as published by\r
11# the Free Software Foundation; either version 2, or (at your option)\r
12# any later version.\r
177c0ea7 13#\r
8af54a64
AI
14# GNU Emacs is distributed in the hope that it will be useful,\r
15# but WITHOUT ANY WARRANTY; without even the implied warranty of\r
16# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
17# GNU General Public License for more details.\r
177c0ea7 18#\r
8af54a64
AI
19# You should have received a copy of the GNU General Public License\r
20# along with GNU Emacs; see the file COPYING. If not, write to\r
364c38d3
LK
21# the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\r
22# Boston, MA 02110-1301, USA.\r
8af54a64
AI
23\r
24ALL = addpm ddeclient runemacs cmdproxy addsection preprep\r
25\r
26.PHONY: $(ALL)\r
27\r
28TRES = $(BLD)/emacs.res\r
29\r
30addpm: $(BLD) $(BLD)/addpm.exe\r
31$(BLD)/addpm.exe: $(BLD)/addpm.$(O)\r
32 $(LINK) $(LINK_OUT)$@ \\r
33 $(LINK_FLAGS) $(ALL_DEPS) $(BASE_LIBS) $(ADVAPI32) $(USER32)\r
34\r
35ddeclient: $(BLD) $(BLD)/ddeclient.exe\r
36$(BLD)/ddeclient.exe: $(BLD)/ddeclient.$(O)\r
37 $(LINK) $(LINK_OUT)$@ \\r
38 $(LINK_FLAGS) $(ALL_DEPS) $(BASE_LIBS) $(ADVAPI32) $(USER32)\r
39\r
40cmdproxy: $(BLD) $(BLD)/cmdproxy.exe\r
41$(BLD)/cmdproxy.exe: $(BLD)/cmdproxy.$(O)\r
42 $(LINK) $(LINK_OUT)$@ \\r
43 $(LINK_FLAGS) $(ALL_DEPS) $(BASE_LIBS) $(USER32)\r
44\r
45addsection: $(BLD) $(BLD)/addsection.exe\r
46$(BLD)/addsection.exe: $(BLD)/addsection.$(O)\r
47 $(LINK) $(LINK_OUT)$@ \\r
48 $(LINK_FLAGS) $(ALL_DEPS) $(BASE_LIBS) $(USER32)\r
49\r
50preprep: $(BLD) $(BLD)/preprep.exe\r
51$(BLD)/preprep.exe: $(BLD)/preprep.$(O)\r
52 $(LINK) $(LINK_OUT)$@ \\r
53 $(LINK_FLAGS) $(ALL_DEPS) $(BASE_LIBS)\r
54\r
55#\r
56# The resource file. NT 3.10 requires the use of cvtres; even though\r
57# it is not necessary on later versions, it is still ok to use it.\r
58#\r
59$(TRES): emacs.rc\r
60 $(RC) $(RC_OUT)$(BLD)/emacs.res $(ALL_DEPS)\r
61\r
62runemacs: $(BLD) $(BLD)/runemacs.exe\r
63$(BLD)/runemacs.exe: $(BLD)/runemacs.$(O) $(TRES)\r
64 $(LINK) $(LINK_OUT)$@ $(SUBSYSTEM_WINDOWS) \\r
65 $(LINK_FLAGS) $(ALL_DEPS) $(BASE_LIBS) $(ADVAPI32) $(USER32)\r
66\r
67which-sh:\r
68 @echo Using $(THE_SHELL) as shell.\r
69\r
70#\r
71# Build emacs\r
72#\r
c3c57777 73all: which-sh $(BLD) $(ALL) maybe-bootstrap all-other-dirs-$(MAKETYPE)\r
8af54a64
AI
74\r
75all-other-dirs-nmake:\r
76 cd ..\lib-src\r
77 $(MAKE) $(MFLAGS) all\r
78 cd ..\src\r
79 $(MAKE) $(MFLAGS) all\r
80 cd ..\lisp\r
81 $(MAKE) $(MFLAGS) all\r
82 cd ..\leim\r
83 $(MAKE) $(MFLAGS) all\r
84 cd ..\nt\r
85\r
86all-other-dirs-gmake:\r
87 $(MAKE) $(MFLAGS) -C ../lib-src all\r
88 $(MAKE) $(MFLAGS) -C ../src all\r
89 $(MAKE) $(MFLAGS) -C ../lisp all\r
90 $(MAKE) $(MFLAGS) -C ../leim all\r
91\r
92recompile: recompile-$(MAKETYPE)\r
93\r
94recompile-nmake:\r
95 cd ..\lisp\r
96 $(MAKE) $(MFLAGS) recompile\r
97 cd ..\nt\r
98\r
99recompile-gmake:\r
100 $(MAKE) $(MFLAGS) -C ../lisp recompile\r
101\r
102#### Bootstrapping.\r
103\r
104### This is meant for Emacs maintainers only. It first cleans the\r
105### lisp subdirectory, removing all compiled Lisp files. Then a\r
106### special emacs executable is built from Lisp sources, which is then\r
107### used to compile Lisp files. The last step is a "normal" make.\r
108\r
c3c57777
JR
109maybe-bootstrap: maybe-bootstrap-$(SHELLTYPE)\r
110\r
111# dummy target to force other targets to be evaluated.\r
112doit:\r
113\r
114maybe-bootstrap-CMD: doit\r
d5ef6196 115 @echo .\r
c3c57777
JR
116 @if not EXIST ..\lisp\abbrev.elc echo Essential Lisp files seem to be missing. You should either\r
117 @if not EXIST ..\lisp\abbrev.elc echo do 'make bootstrap' or create 'lisp/abbrev.elc' somehow\r
d5ef6196 118 @echo .\r
c3c57777
JR
119 @if not EXIST ..\lisp\abbrev.elc exit -1\r
120\r
121maybe-bootstrap-SH: doit\r
122 @if [ ! -f ../lisp/abbrev.elc ] ; then \\r
123 echo; \\r
124 echo "Essential Lisp files seem to be missing. You should either"; \\r
125 echo "do \`make bootstrap' or create \`lisp/abbrev.elc' somehow."; \\r
126 echo; \\r
127 exit -1; \\r
128 fi\r
129\r
0e4435be 130bootstrap: addsection bootstrap-$(MAKETYPE) all\r
8af54a64
AI
131\r
132bootstrap-nmake:\r
133 cd ..\lisp\r
134 $(MAKE) $(MFLAGS) bootstrap-clean\r
135 cd ..\src\r
136 $(MAKE) $(MFLAGS) clean\r
137 cd ..\lib-src\r
dc728514 138 $(MAKE) $(MFLAGS) clean\r
8af54a64
AI
139 cd ..\src\r
140 $(MAKE) $(MFLAGS) bootstrap\r
141 $(MAKE) $(MFLAGS) bootstrap-clean\r
142 cd ..\lisp\r
73dfa0bf 143 $(MAKE) $(MFLAGS) SHELL=$(SHELLTYPE) bootstrap\r
dc728514
JB
144 cd ..\lib-src\r
145 $(MAKE) $(MFLAGS) DOC\r
8af54a64
AI
146 cd ..\nt\r
147\r
148bootstrap-gmake:\r
149 $(MAKE) $(MFLAGS) -C ../lisp bootstrap-clean\r
150 $(MAKE) $(MFLAGS) -C ../src clean\r
dc728514 151 $(MAKE) $(MFLAGS) -C ../lib-src clean\r
8af54a64
AI
152 $(MAKE) $(MFLAGS) -C ../src bootstrap\r
153 $(MAKE) $(MFLAGS) -C ../src bootstrap-clean\r
154 $(MAKE) $(MFLAGS) -C ../lisp bootstrap\r
dc728514 155 $(MAKE) $(MFLAGS) -C ../lib-src DOC\r
8af54a64
AI
156\r
157bootstrap-clean: bootstrap-clean-$(MAKETYPE)\r
158\r
159bootstrap-clean-nmake:\r
160 cd ..\src\r
161 $(MAKE) $(MFLAGS) bootstrap-clean\r
162 cd ..\lisp\r
163 $(MAKE) $(MFLAGS) bootstrap-clean\r
164\r
165bootstrap-clean-gmake:\r
166 $(MAKE) $(MFLAGS) -C ../src bootstrap-clean\r
167 $(MAKE) $(MFLAGS) -C ../lisp bootstrap-clean\r
168\r
169$(INSTALL_DIR):\r
170 - mkdir "$(INSTALL_DIR)"\r
171\r
172$(INSTALL_DIR)/bin: $(INSTALL_DIR)\r
173 - mkdir "$(INSTALL_DIR)/bin"\r
174\r
175#\r
176# Build and install emacs in INSTALL_DIR\r
177#\r
178install: all $(INSTALL_DIR)/bin install-other-dirs-$(MAKETYPE)\r
179 - $(CP) $(BLD)/addpm.exe $(INSTALL_DIR)/bin\r
180 - $(CP) $(BLD)/ddeclient.exe $(INSTALL_DIR)/bin\r
181 - $(CP) $(BLD)/cmdproxy.exe $(INSTALL_DIR)/bin\r
182 - $(CP) $(BLD)/runemacs.exe $(INSTALL_DIR)/bin\r
8af54a64
AI
183 - "$(INSTALL_DIR)/bin/addpm" /q\r
184 - $(DEL) ../same-dir.tst\r
185 - $(DEL) $(INSTALL_DIR)/same-dir.tst\r
186 echo SameDirTest > "$(INSTALL_DIR)/same-dir.tst"\r
187 - mkdir "$(INSTALL_DIR)/etc"\r
188 - mkdir "$(INSTALL_DIR)/info"\r
189 - mkdir "$(INSTALL_DIR)/lock"\r
190 - mkdir "$(INSTALL_DIR)/data"\r
191 - mkdir "$(INSTALL_DIR)/site-lisp"\r
192 - mkdir "$(INSTALL_DIR)/etc/icons"\r
193 $(IFNOTSAMEDIR) $(CP) ../site-lisp/subdirs.el $(INSTALL_DIR)/site-lisp $(ENDIF)\r
194 $(IFNOTSAMEDIR) $(CP_DIR) ../etc $(INSTALL_DIR) $(ENDIF)\r
195 - $(CP_DIR) icons $(INSTALL_DIR)/etc\r
196 $(IFNOTSAMEDIR) $(CP_DIR) ../info $(INSTALL_DIR) $(ENDIF)\r
197 - $(DEL) ../same-dir.tst\r
198 - $(DEL) $(INSTALL_DIR)/same-dir.tst\r
199\r
200install-other-dirs-nmake:\r
201 cd ..\lib-src\r
202 $(MAKE) $(MFLAGS) install\r
203 cd ..\src\r
204 $(MAKE) $(MFLAGS) install\r
205 cd ..\lisp\r
206 $(MAKE) $(MFLAGS) install\r
207 cd ..\leim\r
208 $(MAKE) $(MFLAGS) install\r
209 cd ..\nt\r
210\r
211install-other-dirs-gmake:\r
212 $(MAKE) $(MFLAGS) -C ../lib-src install\r
213 $(MAKE) $(MFLAGS) -C ../src install\r
214 $(MAKE) $(MFLAGS) -C ../lisp install\r
215 $(MAKE) $(MFLAGS) -C ../leim install\r
216\r
fd1f2f1e
JR
217force-info:\r
218# Note that man/makefile knows how to\r
219# put the info files in $(infodir),\r
220# so we can do ok running make in the build dir.\r
5eb3d2a5
JR
221info: force-info info-$(MAKETYPE)\r
222\r
223info-nmake:\r
224 cd ..\man\r
225 $(MAKE) $(MFLAGS) info\r
226 cd ..\lispref\r
227 $(MAKE) $(MFLAGS) info\r
228 cd ..\lispintro\r
229 $(MAKE) $(MFLAGS) info\r
230\r
231info-gmake:\r
232 $(MAKE) $(MFLAGS) -C ../man info\r
233 $(MAKE) $(MFLAGS) -C ../lispref info\r
234 $(MAKE) $(MFLAGS) -C ../lispintro info\r
8af54a64
AI
235#\r
236# Maintenance\r
177c0ea7 237#\r
8af54a64
AI
238clean: clean-other-dirs-$(MAKETYPE)\r
239 - $(DEL) *~ $(COMPILER_TEMP_FILES)\r
240 - $(DEL_TREE) $(OBJDIR)\r
241 - $(DEL) ../etc/DOC ../etc/DOC-X\r
242\r
243clean-other-dirs-nmake:\r
244 cd ..\lib-src\r
245 $(MAKE) $(MFLAGS) clean\r
246 cd ..\src\r
247 $(MAKE) $(MFLAGS) clean\r
248 cd ..\lisp\r
249 $(MAKE) $(MFLAGS) clean\r
fd1f2f1e
JR
250 cd ..\lispintro\r
251 $(MAKE) $(MFLAGS) clean\r
252 cd ..\lispref\r
253 $(MAKE) $(MFLAGS) clean\r
8af54a64
AI
254 cd ..\leim\r
255 $(MAKE) $(MFLAGS) clean\r
fd1f2f1e
JR
256 cd ..\man\r
257 $(MAKE) $(MFLAGS) clean\r
8af54a64
AI
258 cd ..\nt\r
259\r
260clean-other-dirs-gmake:\r
261 $(MAKE) $(MFLAGS) -C ../lib-src clean\r
262 $(MAKE) $(MFLAGS) -C ../src clean\r
263 $(MAKE) $(MFLAGS) -C ../lisp clean\r
264 $(MAKE) $(MFLAGS) -C ../leim clean\r
265\r
266cleanall-other-dirs-nmake:\r
267 cd ..\lib-src\r
268 $(MAKE) $(MFLAGS) cleanall\r
269 cd ..\src\r
270 $(MAKE) $(MFLAGS) cleanall\r
271 cd ..\nt\r
272\r
273cleanall-other-dirs-gmake:\r
274 $(MAKE) $(MFLAGS) -C ../lib-src cleanall\r
275 $(MAKE) $(MFLAGS) -C ../src cleanall\r
276\r
277cleanall: clean cleanall-other-dirs-$(MAKETYPE)\r
278 - $(DEL_TREE) obj\r
279 - $(DEL_TREE) obj-spd\r
280 - $(DEL_TREE) oo\r
281 - $(DEL_TREE) oo-spd\r
282\r
283realclean: cleanall\r
284 - $(DEL_TREE) ../bin\r