(checkdoc-minor-mode): Define it with define-minor-mode.
[emacs.git] / nt / makefile.w32-in
bloba74cfcc7efda7767731863c7edaced85a1dd51f1
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\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 ..\lib-src\r
123         $(MAKE) $(MFLAGS) DOC\r
124         cd ..\nt\r
126 bootstrap-gmake:\r
127         $(MAKE) $(MFLAGS) -C ../lisp bootstrap-clean\r
128         $(MAKE) $(MFLAGS) -C ../src clean\r
129         $(MAKE) $(MFLAGS) -C ../lib-src clean\r
130         $(MAKE) $(MFLAGS) -C ../src bootstrap\r
131         $(MAKE) $(MFLAGS) -C ../src bootstrap-clean\r
132         $(MAKE) $(MFLAGS) -C ../lisp bootstrap\r
133         $(MAKE) $(MFLAGS) -C ../lib-src DOC\r
135 bootstrap-clean: bootstrap-clean-$(MAKETYPE)\r
137 bootstrap-clean-nmake:\r
138         cd ..\src\r
139         $(MAKE) $(MFLAGS) bootstrap-clean\r
140         cd ..\lisp\r
141         $(MAKE) $(MFLAGS) bootstrap-clean\r
143 bootstrap-clean-gmake:\r
144         $(MAKE) $(MFLAGS) -C ../src bootstrap-clean\r
145         $(MAKE) $(MFLAGS) -C ../lisp bootstrap-clean\r
147 $(INSTALL_DIR):\r
148         - mkdir "$(INSTALL_DIR)"\r
150 $(INSTALL_DIR)/bin: $(INSTALL_DIR)\r
151         - mkdir "$(INSTALL_DIR)/bin"\r
154 # Build and install emacs in INSTALL_DIR\r
156 install: all $(INSTALL_DIR)/bin install-other-dirs-$(MAKETYPE)\r
157         - $(CP) $(BLD)/addpm.exe $(INSTALL_DIR)/bin\r
158         - $(CP) $(BLD)/ddeclient.exe $(INSTALL_DIR)/bin\r
159         - $(CP) $(BLD)/cmdproxy.exe $(INSTALL_DIR)/bin\r
160         - $(CP) $(BLD)/runemacs.exe $(INSTALL_DIR)/bin\r
161         - $(CP) ../lib-src/fns-*.el $(INSTALL_DIR)/bin\r
162         - "$(INSTALL_DIR)/bin/addpm" /q\r
163         - $(DEL) ../same-dir.tst\r
164         - $(DEL) $(INSTALL_DIR)/same-dir.tst\r
165         echo SameDirTest > "$(INSTALL_DIR)/same-dir.tst"\r
166         - mkdir "$(INSTALL_DIR)/etc"\r
167         - mkdir "$(INSTALL_DIR)/info"\r
168         - mkdir "$(INSTALL_DIR)/lock"\r
169         - mkdir "$(INSTALL_DIR)/data"\r
170         - mkdir "$(INSTALL_DIR)/site-lisp"\r
171         - mkdir "$(INSTALL_DIR)/etc/icons"\r
172         $(IFNOTSAMEDIR) $(CP) ../site-lisp/subdirs.el $(INSTALL_DIR)/site-lisp $(ENDIF)\r
173         $(IFNOTSAMEDIR) $(CP_DIR) ../etc $(INSTALL_DIR) $(ENDIF)\r
174         - $(CP_DIR) icons $(INSTALL_DIR)/etc\r
175         $(IFNOTSAMEDIR) $(CP_DIR) ../info $(INSTALL_DIR) $(ENDIF)\r
176         - $(DEL) ../same-dir.tst\r
177         - $(DEL) $(INSTALL_DIR)/same-dir.tst\r
179 install-other-dirs-nmake:\r
180         cd ..\lib-src\r
181         $(MAKE) $(MFLAGS) install\r
182         cd ..\src\r
183         $(MAKE) $(MFLAGS) install\r
184         cd ..\lisp\r
185         $(MAKE) $(MFLAGS) install\r
186         cd ..\leim\r
187         $(MAKE) $(MFLAGS) install\r
188         cd ..\nt\r
190 install-other-dirs-gmake:\r
191         $(MAKE) $(MFLAGS) -C ../lib-src install\r
192         $(MAKE) $(MFLAGS) -C ../src install\r
193         $(MAKE) $(MFLAGS) -C ../lisp install\r
194         $(MAKE) $(MFLAGS) -C ../leim install\r
197 # Maintenance\r
198 \r
199 clean:  clean-other-dirs-$(MAKETYPE)\r
200         - $(DEL) *~ $(COMPILER_TEMP_FILES)\r
201         - $(DEL_TREE) $(OBJDIR)\r
202         - $(DEL) ../etc/DOC ../etc/DOC-X\r
204 clean-other-dirs-nmake:\r
205         cd ..\lib-src\r
206         $(MAKE) $(MFLAGS) clean\r
207         cd ..\src\r
208         $(MAKE) $(MFLAGS) clean\r
209         cd ..\lisp\r
210         $(MAKE) $(MFLAGS) clean\r
211         cd ..\leim\r
212         $(MAKE) $(MFLAGS) clean\r
213         cd ..\nt\r
215 clean-other-dirs-gmake:\r
216         $(MAKE) $(MFLAGS) -C ../lib-src clean\r
217         $(MAKE) $(MFLAGS) -C ../src clean\r
218         $(MAKE) $(MFLAGS) -C ../lisp clean\r
219         $(MAKE) $(MFLAGS) -C ../leim clean\r
221 cleanall-other-dirs-nmake:\r
222         cd ..\lib-src\r
223         $(MAKE) $(MFLAGS) cleanall\r
224         cd ..\src\r
225         $(MAKE) $(MFLAGS) cleanall\r
226         cd ..\nt\r
228 cleanall-other-dirs-gmake:\r
229         $(MAKE) $(MFLAGS) -C ../lib-src cleanall\r
230         $(MAKE) $(MFLAGS) -C ../src cleanall\r
232 cleanall: clean cleanall-other-dirs-$(MAKETYPE)\r
233          - $(DEL_TREE) obj\r
234          - $(DEL_TREE) obj-spd\r
235          - $(DEL_TREE) oo\r
236          - $(DEL_TREE) oo-spd\r
238 realclean: cleanall\r
239         - $(DEL_TREE) ../bin\r