root/trunk/nt/makefile.mw32-in

Revision 4187, 9.0 kB (checked in by fujii, 2 years ago)

Sync up with makefile.w32-in.

  • Property svn:eol-style set to native
Line 
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             = RunMW32 install_exe cmdproxy fiber addsection preprep
25
26 .PHONY: $(ALL)
27
28 TRES            = $(BLD)/meadow.res
29
30 XMFLAGS         =
31
32 install_exe:    stamp_BLD $(BLD)/install.exe
33 $(BLD)/install.exe: $(BLD)/install.$(O)
34                 $(LINK) $(LINK_OUT)$@ \
35                 $(LINK_FLAGS) $(ALL_DEPS) $(BASE_LIBS) $(ADVAPI32) $(USER32) $(OLE32) $(SHELL32) $(UUID)
36
37 fiber:          stamp_BLD $(BLD)/fiber.exe
38 $(BLD)/fiber.exe: $(BLD)/fiber.$(O)
39                 $(LINK) $(LINK_OUT)$@ \
40                 $(LINK_FLAGS) $(ALL_DEPS) $(BASE_LIBS) $(ADVAPI32) $(SHELL32) $(USER32)
41
42 RunMW32:        stamp_BLD $(BLD)/RunMW32.exe
43 $(BLD)/RunMW32.exe: $(BLD)/RunMW32.$(O) $(TRES)
44                 $(LINK) -mwindows $(LINK_OUT)$@ \
45                 $(LINK_FLAGS) $(ALL_DEPS) $(BASE_LIBS) $(USER32)
46
47 cmdproxy:         stamp_BLD $(BLD)/cmdproxy.exe
48 $(BLD)/cmdproxy.exe: $(BLD)/cmdproxy.$(O)
49                   $(LINK) $(LINK_OUT)$@ \
50                   $(LINK_FLAGS) $(ALL_DEPS) $(BASE_LIBS) $(USER32)
51
52 addsection:       stamp_BLD $(BLD)/addsection.exe
53 $(BLD)/addsection.exe: $(BLD)/addsection.$(O)
54                   $(LINK) $(LINK_OUT)$@ \
55                   $(LINK_FLAGS) $(ALL_DEPS) $(BASE_LIBS) $(USER32)
56
57 preprep:          stamp_BLD $(BLD)/preprep.exe
58 $(BLD)/preprep.exe: $(BLD)/preprep.$(O)
59                   $(LINK) $(LINK_OUT)$@ \
60                   $(LINK_FLAGS) $(ALL_DEPS) $(BASE_LIBS)
61
62 #
63 # The resource file.  NT 3.10 requires the use of cvtres; even though
64 # it is not necessary on later versions, it is still ok to use it.
65 #
66 $(TRES):        meadow.rc stamp_BLD
67                 $(RC) $(RC_OUT)$(BLD)/meadow.res meadow.rc
68
69 which-sh:
70         @echo Using $(THE_SHELL) as shell.
71
72 # These depend on stamp_BLD to make sure the $(BLD) directory is created
73 # before the compilation begins, even if Make runs several commands
74 # in parallel under "make -j".
75 #
76 $(BLD)/addpm.$(O) $(BLD)/ddeclient.$(O) $(BLD)/runemacs.$(O) $(BLD)/cmdproxy.$(O) $(BLD)/addsection.$(O) $(BLD)/preprep.$(O): stamp_BLD
77
78 #
79 # Build emacs
80 #
81 all:    which-sh stamp_BLD $(ALL) maybe-bootstrap all-other-dirs-$(MAKETYPE)
82
83 all-other-dirs-nmake: addsection
84         cd ..\lib-src
85         $(MAKE) $(MFLAGS) all
86         cd ..\src
87         $(MAKE) $(MFLAGS) all
88         cd ..\lisp
89         $(MAKE) $(MFLAGS) all
90         cd ..\leim
91         $(MAKE) $(MFLAGS) all
92         cd ..\nt
93
94 all-other-dirs-gmake: addsection
95         $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../lib-src all
96         $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../src all
97         $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../lisp all
98         $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../leim all
99
100 recompile:      recompile-$(MAKETYPE)
101
102 recompile-nmake:
103         cd ..\lisp
104         $(MAKE) $(MFLAGS) recompile
105         cd ..\nt
106
107 recompile-gmake:
108         $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../lisp recompile
109
110 #### Bootstrapping.
111
112 ### This is meant for Emacs maintainers only.  It first cleans the
113 ### lisp subdirectory, removing all compiled Lisp files.  Then a
114 ### special emacs executable is built from Lisp sources, which is then
115 ### used to compile Lisp files.  The last step is a "normal" make.
116
117 maybe-bootstrap: maybe-bootstrap-$(SHELLTYPE)
118
119 # dummy target to force other targets to be evaluated.
120 doit:
121
122 maybe-bootstrap-CMD:    doit
123         @echo .
124         @if not EXIST ..\lisp\abbrev.elc echo Essential Lisp files seem to be missing.  You should either
125         @if not EXIST ..\lisp\abbrev.elc echo do 'make bootstrap' or create 'lisp/abbrev.elc' somehow
126         @echo .
127         @if not EXIST ..\lisp\abbrev.elc exit -1
128
129 maybe-bootstrap-SH: doit
130         @if [ ! -f ../lisp/abbrev.elc ] ; then \
131           echo; \
132           echo "Essential Lisp files seem to be missing.  You should either"; \
133           echo "do \`make bootstrap' or create \`lisp/abbrev.elc' somehow.";  \
134           echo; \
135           exit -1; \
136         fi
137
138 bootstrap:      addsection bootstrap-$(MAKETYPE)
139         $(MAKE) $(MFLAGS) $(XMFLAGS) all
140
141 bootstrap-nmake: addsection
142         cd ..\lisp
143         $(MAKE) $(MFLAGS) bootstrap-clean
144         cd ..\nt
145         $(MAKE) $(MFLAGS) info
146         cd ..\src
147         $(MAKE) $(MFLAGS) clean
148         cd ..\lib-src
149         $(MAKE) $(MFLAGS) clean
150         cd ..\src
151         $(MAKE) $(MFLAGS) bootstrap
152         $(MAKE) $(MFLAGS) bootstrap-clean
153         cd ..\lisp
154         $(MAKE) $(MFLAGS) SHELL=$(SHELLTYPE) bootstrap
155         cd ..\lib-src
156         $(MAKE) $(MFLAGS) DOC
157         cd ..\nt
158
159 bootstrap-gmake: addsection
160         $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../lisp bootstrap-clean
161         $(MAKE) $(MFLAGS) $(XMFLAGS) info
162         $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../src clean
163         $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../lib-src clean
164         $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../src bootstrap
165         $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../src bootstrap-clean
166         $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../lisp bootstrap
167         $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../lib-src DOC
168
169 bootstrap-clean: bootstrap-clean-$(MAKETYPE)
170
171 bootstrap-clean-nmake:
172         cd ..\src
173         $(MAKE) $(MFLAGS) bootstrap-clean
174         cd ..\lisp
175         $(MAKE) $(MFLAGS) bootstrap-clean
176
177 bootstrap-clean-gmake:
178         $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../src bootstrap-clean
179         $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../lisp bootstrap-clean
180
181 $(INSTALL_DIR):
182         - mkdir "$(INSTALL_DIR)"
183
184 $(INSTALL_DIR)/bin: $(INSTALL_DIR)
185         - mkdir "$(INSTALL_DIR)/bin"
186
187 #
188 # Build and install emacs in INSTALL_DIR
189 #
190 install: all $(INSTALL_DIR)/bin info install-other-dirs-$(MAKETYPE)
191         - $(CP) $(BLD)/cmdproxy.exe $(INSTALL_DIR)/bin
192         - $(DEL) ../same-dir.tst
193         - $(DEL) $(INSTALL_DIR)/same-dir.tst
194         echo SameDirTest > "$(INSTALL_DIR)/same-dir.tst"
195         - mkdir "$(INSTALL_DIR)/etc"
196         - mkdir "$(INSTALL_DIR)/info"
197         - mkdir "$(INSTALL_DIR)/site-lisp"
198         - mkdir "$(INSTALL_DIR)/etc/icons"
199         $(IFNOTSAMEDIR) $(CP) ../site-lisp/subdirs.el $(INSTALL_DIR)/site-lisp $(ENDIF)
200         $(IFNOTSAMEDIR) $(CP_DIR) "..\etc" "$(INSTALL_DIR_M_DOS)\etc" $(ENDIF)
201         - $(CP_DIR) icons "$(INSTALL_DIR_M_DOS)\etc\icons"
202         $(IFNOTSAMEDIR) $(CP_DIR) "..\info" "$(INSTALL_DIR_M_DOS)\info" $(ENDIF)
203         - $(CP) README.Meadow $(INSTALL_DIR)
204         - $(CP) INSTALL.Meadow $(INSTALL_DIR)
205         - $(CP) README.Meadow.ja $(INSTALL_DIR)
206         - $(CP) INSTALL.Meadow.ja $(INSTALL_DIR)
207         - $(CP) dot.emacs.ja $(INSTALL_DIR)
208         - $(CP) fiber.txt $(INSTALL_DIR)/bin
209         - $(CP) dump.bat $(INSTALL_DIR)/bin
210         - $(CP) $(BLD)/cmdproxy.exe $(INSTALL_DIR)/bin
211         - $(CP) $(BLD)/RunMW32.exe $(INSTALL_DIR)/bin
212         - $(CP) meadow.ico $(INSTALL_DIR)/bin
213         - $(CP) $(BLD)/install.exe $(INSTALL_DIR)
214         - $(CP) $(BLD)/fiber.exe $(INSTALL_DIR)/bin
215         - mkdir "$(INSTALL_DIR)/site-lisp"
216         - $(CP) ../site-lisp/subdirs.el $(INSTALL_DIR)/site-lisp
217         - mkdir "$(INSTALL_DIR_M)/bitmap"
218         $(IFNOTSAMEDIR) $(CP_DIR) bitmap "$(INSTALL_DIR_M_DOS)\bitmap" $(ENDIF)
219         - $(DEL) ../same-dir.tst
220         - $(DEL) $(INSTALL_DIR)/same-dir.tst
221
222 install-other-dirs-nmake:
223         cd ..\lib-src
224         $(MAKE) $(MFLAGS) install
225         cd ..\src
226         $(MAKE) $(MFLAGS) install
227         cd ..\lisp
228         $(MAKE) $(MFLAGS) install
229         cd ..\leim
230         $(MAKE) $(MFLAGS) install
231         cd ..\nt
232
233 install-other-dirs-gmake:
234         $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../lib-src install
235         $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../src install
236         $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../lisp install
237         $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../leim install
238
239 force-info:
240 # Note that man/makefile knows how to
241 # put the info files in $(infodir),
242 # so we can do ok running make in the build dir.
243 info: force-info info-$(MAKETYPE)
244
245 info-nmake:
246         cd ..\man
247         $(MAKE) $(MFLAGS) info
248         cd ..\lispref
249         $(MAKE) $(MFLAGS) info
250         cd ..\lispintro
251         $(MAKE) $(MFLAGS) info
252
253 info-gmake:
254         $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../man info
255         $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../lispref info
256         $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../lispintro info
257 #
258 # Maintenance
259 #
260 clean:  clean-other-dirs-$(MAKETYPE)
261         - $(DEL) *~ $(COMPILER_TEMP_FILES)
262         - $(DEL_TREE) $(OBJDIR)
263         - $(DEL) stamp_BLD
264         - $(DEL) ../etc/DOC ../etc/DOC-X
265
266 clean-other-dirs-nmake:
267         cd ..\lib-src
268         $(MAKE) $(MFLAGS) clean
269         cd ..\src
270         $(MAKE) $(MFLAGS) clean
271         cd ..\lisp
272         $(MAKE) $(MFLAGS) clean
273         cd ..\lispintro
274         $(MAKE) $(MFLAGS) clean
275         cd ..\lispref
276         $(MAKE) $(MFLAGS) clean
277         cd ..\leim
278         $(MAKE) $(MFLAGS) clean
279         cd ..\man
280         $(MAKE) $(MFLAGS) clean
281         cd ..\nt
282
283 clean-other-dirs-gmake:
284         $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../lib-src clean
285         $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../src clean
286         $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../lisp clean
287         $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../lispintro clean
288         $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../lispref clean
289         $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../leim clean
290         $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../man clean
291
292 cleanall-other-dirs-nmake:
293         cd ..\lib-src
294         $(MAKE) $(MFLAGS) cleanall
295         cd ..\src
296         $(MAKE) $(MFLAGS) cleanall
297         cd ..\nt
298
299 cleanall-other-dirs-gmake:
300         $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../lib-src cleanall
301         $(MAKE) $(MFLAGS) $(XMFLAGS) -C ../src cleanall
302
303 cleanall: clean cleanall-other-dirs-$(MAKETYPE)
304          - $(DEL_TREE) obj
305          - $(DEL_TREE) obj-spd
306          - $(DEL_TREE) oo
307          - $(DEL_TREE) oo-spd
308
309 realclean: cleanall
310         - $(DEL_TREE) ../bin
Note: See TracBrowser for help on using the browser.