(autoselect_window_p): Renamed from `x_autoselect_window_p'.
[emacs.git] / nt / makefile.w32-in
blob47787bae09eaa28e2f246a1777aa9dd8f258636d
1 #  Makefile for GNU Emacs on the Microsoft W32 API.\r
2 #  Copyright (c) 2000-2001 Free Software Foundation, Inc.\r
3 #\r
4 #  Top level makefile for building GNU Emacs on Windows NT\r
5 #\r
6 #  This file is part of GNU Emacs.\r
7 #  \r
8 #  GNU Emacs is free software; you can redistribute it and/or modify\r
9 #  it under the terms of the GNU General Public License as published by\r
10 #  the Free Software Foundation; either version 2, or (at your option)\r
11 #  any later version.\r
12 #  \r
13 #  GNU Emacs is distributed in the hope that it will be useful,\r
14 #  but WITHOUT ANY WARRANTY; without even the implied warranty of\r
15 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
16 #  GNU General Public License for more details.\r
17 #  \r
18 #  You should have received a copy of the GNU General Public License\r
19 #  along with GNU Emacs; see the file COPYING.  If not, write to\r
20 #  the Free Software Foundation, Inc., 59 Temple Place - Suite 330,\r
21 #  Boston, MA 02111-1307, USA.\r
23 ALL             = addpm ddeclient runemacs cmdproxy addsection preprep\r
25 .PHONY: $(ALL)\r
27 TRES            = $(BLD)/emacs.res\r
29 addpm:            $(BLD) $(BLD)/addpm.exe\r
30 $(BLD)/addpm.exe: $(BLD)/addpm.$(O)\r
31                   $(LINK) $(LINK_OUT)$@ \\r
32                   $(LINK_FLAGS) $(ALL_DEPS) $(BASE_LIBS) $(ADVAPI32) $(USER32)\r
34 ddeclient:        $(BLD) $(BLD)/ddeclient.exe\r
35 $(BLD)/ddeclient.exe: $(BLD)/ddeclient.$(O)\r
36                   $(LINK) $(LINK_OUT)$@ \\r
37                   $(LINK_FLAGS) $(ALL_DEPS) $(BASE_LIBS) $(ADVAPI32) $(USER32)\r
39 cmdproxy:         $(BLD) $(BLD)/cmdproxy.exe\r
40 $(BLD)/cmdproxy.exe: $(BLD)/cmdproxy.$(O)\r
41                   $(LINK) $(LINK_OUT)$@ \\r
42                   $(LINK_FLAGS) $(ALL_DEPS) $(BASE_LIBS) $(USER32)\r
44 addsection:       $(BLD) $(BLD)/addsection.exe\r
45 $(BLD)/addsection.exe: $(BLD)/addsection.$(O)\r
46                   $(LINK) $(LINK_OUT)$@ \\r
47                   $(LINK_FLAGS) $(ALL_DEPS) $(BASE_LIBS) $(USER32)\r
49 preprep:          $(BLD) $(BLD)/preprep.exe\r
50 $(BLD)/preprep.exe: $(BLD)/preprep.$(O)\r
51                   $(LINK) $(LINK_OUT)$@ \\r
52                   $(LINK_FLAGS) $(ALL_DEPS) $(BASE_LIBS)\r
54 #\r
55 # The resource file.  NT 3.10 requires the use of cvtres; even though\r
56 # it is not necessary on later versions, it is still ok to use it.\r
57 #\r
58 $(TRES):        emacs.rc\r
59                 $(RC) $(RC_OUT)$(BLD)/emacs.res $(ALL_DEPS)\r
61 runemacs:         $(BLD) $(BLD)/runemacs.exe\r
62 $(BLD)/runemacs.exe: $(BLD)/runemacs.$(O) $(TRES)\r
63                   $(LINK) $(LINK_OUT)$@ $(SUBSYSTEM_WINDOWS) \\r
64                   $(LINK_FLAGS) $(ALL_DEPS) $(BASE_LIBS) $(ADVAPI32) $(USER32)\r
66 which-sh:\r
67         @echo Using $(THE_SHELL) as shell.\r
69 #\r
70 # Build emacs\r
71 #\r
72 all:    which-sh $(BLD) $(ALL) all-other-dirs-$(MAKETYPE)\r
74 all-other-dirs-nmake:\r
75         cd ..\lib-src\r
76         $(MAKE) $(MFLAGS) all\r
77         cd ..\src\r
78         $(MAKE) $(MFLAGS) all\r
79         cd ..\lisp\r
80         $(MAKE) $(MFLAGS) all\r
81         cd ..\leim\r
82         $(MAKE) $(MFLAGS) all\r
83         cd ..\nt\r
85 all-other-dirs-gmake:\r
86         $(MAKE) $(MFLAGS) -C ../lib-src all\r
87         $(MAKE) $(MFLAGS) -C ../src all\r
88         $(MAKE) $(MFLAGS) -C ../lisp all\r
89         $(MAKE) $(MFLAGS) -C ../leim all\r
91 recompile:      recompile-$(MAKETYPE)\r
93 recompile-nmake:\r
94         cd ..\lisp\r
95         $(MAKE) $(MFLAGS) recompile\r
96         cd ..\nt\r
98 recompile-gmake:\r
99         $(MAKE) $(MFLAGS) -C ../lisp recompile\r
101 #### Bootstrapping.\r
103 ### This is meant for Emacs maintainers only.  It first cleans the\r
104 ### lisp subdirectory, removing all compiled Lisp files.  Then a\r
105 ### special emacs executable is built from Lisp sources, which is then\r
106 ### used to compile Lisp files.  The last step is a "normal" make.\r
108 bootstrap:      addsection bootstrap-$(MAKETYPE) all\r
110 bootstrap-nmake:\r
111         cd ..\lisp\r
112         $(MAKE) $(MFLAGS) bootstrap-clean\r
113         cd ..\src\r
114         $(MAKE) $(MFLAGS) clean\r
115         cd ..\lib-src\r
116         $(MAKE) $(MFLAGS) clean DOC\r
117         cd ..\src\r
118         $(MAKE) $(MFLAGS) bootstrap\r
119         $(MAKE) $(MFLAGS) bootstrap-clean\r
120         cd ..\lisp\r
121         $(MAKE) $(MFLAGS) bootstrap\r
122         cd ..\nt\r
124 bootstrap-gmake:\r
125         $(MAKE) $(MFLAGS) -C ../lisp bootstrap-clean\r
126         $(MAKE) $(MFLAGS) -C ../src clean\r
127         $(MAKE) $(MFLAGS) -C ../lib-src clean DOC\r
128         $(MAKE) $(MFLAGS) -C ../src bootstrap\r
129         $(MAKE) $(MFLAGS) -C ../src bootstrap-clean\r
130         $(MAKE) $(MFLAGS) -C ../lisp bootstrap\r
132 bootstrap-clean: bootstrap-clean-$(MAKETYPE)\r
134 bootstrap-clean-nmake:\r
135         cd ..\src\r
136         $(MAKE) $(MFLAGS) bootstrap-clean\r
137         cd ..\lisp\r
138         $(MAKE) $(MFLAGS) bootstrap-clean\r
140 bootstrap-clean-gmake:\r
141         $(MAKE) $(MFLAGS) -C ../src bootstrap-clean\r
142         $(MAKE) $(MFLAGS) -C ../lisp bootstrap-clean\r
144 $(INSTALL_DIR):\r
145         - mkdir "$(INSTALL_DIR)"\r
147 $(INSTALL_DIR)/bin: $(INSTALL_DIR)\r
148         - mkdir "$(INSTALL_DIR)/bin"\r
151 # Build and install emacs in INSTALL_DIR\r
153 install: all $(INSTALL_DIR)/bin install-other-dirs-$(MAKETYPE)\r
154         - $(CP) $(BLD)/addpm.exe $(INSTALL_DIR)/bin\r
155         - $(CP) $(BLD)/ddeclient.exe $(INSTALL_DIR)/bin\r
156         - $(CP) $(BLD)/cmdproxy.exe $(INSTALL_DIR)/bin\r
157         - $(CP) $(BLD)/runemacs.exe $(INSTALL_DIR)/bin\r
158         - $(CP) ../lib-src/fns-*.el $(INSTALL_DIR)/bin\r
159         - "$(INSTALL_DIR)/bin/addpm" /q\r
160         - $(DEL) ../same-dir.tst\r
161         - $(DEL) $(INSTALL_DIR)/same-dir.tst\r
162         echo SameDirTest > "$(INSTALL_DIR)/same-dir.tst"\r
163         - mkdir "$(INSTALL_DIR)/etc"\r
164         - mkdir "$(INSTALL_DIR)/info"\r
165         - mkdir "$(INSTALL_DIR)/lock"\r
166         - mkdir "$(INSTALL_DIR)/data"\r
167         - mkdir "$(INSTALL_DIR)/site-lisp"\r
168         - mkdir "$(INSTALL_DIR)/etc/icons"\r
169         $(IFNOTSAMEDIR) $(CP) ../site-lisp/subdirs.el $(INSTALL_DIR)/site-lisp $(ENDIF)\r
170         $(IFNOTSAMEDIR) $(CP_DIR) ../etc $(INSTALL_DIR) $(ENDIF)\r
171         - $(CP_DIR) icons $(INSTALL_DIR)/etc\r
172         $(IFNOTSAMEDIR) $(CP_DIR) ../info $(INSTALL_DIR) $(ENDIF)\r
173         - $(DEL) ../same-dir.tst\r
174         - $(DEL) $(INSTALL_DIR)/same-dir.tst\r
176 install-other-dirs-nmake:\r
177         cd ..\lib-src\r
178         $(MAKE) $(MFLAGS) install\r
179         cd ..\src\r
180         $(MAKE) $(MFLAGS) install\r
181         cd ..\lisp\r
182         $(MAKE) $(MFLAGS) install\r
183         cd ..\leim\r
184         $(MAKE) $(MFLAGS) install\r
185         cd ..\nt\r
187 install-other-dirs-gmake:\r
188         $(MAKE) $(MFLAGS) -C ../lib-src install\r
189         $(MAKE) $(MFLAGS) -C ../src install\r
190         $(MAKE) $(MFLAGS) -C ../lisp install\r
191         $(MAKE) $(MFLAGS) -C ../leim install\r
194 # Maintenance\r
195 \r
196 clean:  clean-other-dirs-$(MAKETYPE)\r
197         - $(DEL) *~ $(COMPILER_TEMP_FILES)\r
198         - $(DEL_TREE) $(OBJDIR)\r
199         - $(DEL) ../etc/DOC ../etc/DOC-X\r
201 clean-other-dirs-nmake:\r
202         cd ..\lib-src\r
203         $(MAKE) $(MFLAGS) clean\r
204         cd ..\src\r
205         $(MAKE) $(MFLAGS) clean\r
206         cd ..\lisp\r
207         $(MAKE) $(MFLAGS) clean\r
208         cd ..\leim\r
209         $(MAKE) $(MFLAGS) clean\r
210         cd ..\nt\r
212 clean-other-dirs-gmake:\r
213         $(MAKE) $(MFLAGS) -C ../lib-src clean\r
214         $(MAKE) $(MFLAGS) -C ../src clean\r
215         $(MAKE) $(MFLAGS) -C ../lisp clean\r
216         $(MAKE) $(MFLAGS) -C ../leim clean\r
218 cleanall-other-dirs-nmake:\r
219         cd ..\lib-src\r
220         $(MAKE) $(MFLAGS) cleanall\r
221         cd ..\src\r
222         $(MAKE) $(MFLAGS) cleanall\r
223         cd ..\nt\r
225 cleanall-other-dirs-gmake:\r
226         $(MAKE) $(MFLAGS) -C ../lib-src cleanall\r
227         $(MAKE) $(MFLAGS) -C ../src cleanall\r
229 cleanall: clean cleanall-other-dirs-$(MAKETYPE)\r
230          - $(DEL_TREE) obj\r
231          - $(DEL_TREE) obj-spd\r
232          - $(DEL_TREE) oo\r
233          - $(DEL_TREE) oo-spd\r
235 realclean: cleanall\r
236         - $(DEL_TREE) ../bin\r