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