795
|
1 # Makefile for Microsoft NMAKE -*- Makefile -*-
|
|
2 #
|
428
|
3 # Copyright (C) 1995 Board of Trustees, University of Illinois.
|
2500
|
4 # Copyright (C) 1995, 1996, 2000, 2001, 2002, 2003, 2004 Ben Wing.
|
795
|
5 # Copyright (C) 1997, 1998, 2000 Jonathan Harris.
|
428
|
6 # Copyright (C) 1995 Sun Microsystems, Inc.
|
|
7 # Copyright (C) 1998 Free Software Foundation, Inc.
|
|
8 #
|
|
9 # This file is part of XEmacs.
|
|
10 #
|
|
11 # XEmacs is free software; you can redistribute it and/or modify it
|
|
12 # under the terms of the GNU General Public License as published by the
|
|
13 # Free Software Foundation; either version 2, or (at your option) any
|
|
14 # later version.
|
|
15 #
|
|
16 # XEmacs is distributed in the hope that it will be useful, but WITHOUT
|
|
17 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
18 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
19 # for more details.
|
|
20 #
|
|
21 # You should have received a copy of the GNU General Public License
|
|
22 # along with XEmacs; see the file COPYING. If not, write to
|
|
23 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
24 # Boston, MA 02111-1307, USA.
|
|
25 #
|
|
26 # Synched up with: Not in FSF.
|
|
27 #
|
|
28
|
442
|
29 default: all
|
|
30
|
444
|
31 # APA: Since there seems to be no way to determine the directory where
|
|
32 # xemacs.mak is located (from within nmake) we just insist on the user
|
|
33 # to invoke nmake in the directory where xemacs.mak is.
|
|
34 !if !exist("$(MAKEDIR)\xemacs.mak")
|
|
35 !error Please run nmake from the directory of this makefile (xemacs\nt).
|
|
36 !endif
|
|
37
|
1330
|
38 MAKEROOT=$(MAKEDIR:\nt=)
|
442
|
39
|
1330
|
40 ########################### Common commands.
|
428
|
41
|
1330
|
42 # Put these before including config.inc so they can be overridden there.
|
637
|
43 # Note that some versions of some commands are deficient.
|
428
|
44
|
2106
|
45 # Define a variable for the 'del' command to use.
|
637
|
46 # WinME's DEL command can only handle one argument and only has the /P flag.
|
|
47 # So only delete one glob at a time. Override flags in config.inc.
|
2106
|
48 DEL=-del
|
637
|
49
|
1001
|
50 # Tell COPY, MOVE, and XCOPY to suppress confirmation for overwriting
|
|
51 # files.
|
2106
|
52 COPYCMD=/y
|
1001
|
53 # Define the 'copy' command to use.
|
2106
|
54 COPY=xcopy /q
|
|
55 COPYDIR=xcopy /q /e
|
583
|
56
|
1330
|
57 ########################### Includes, and source and build tree determination.
|
442
|
58
|
|
59 !include "config.inc"
|
428
|
60
|
1330
|
61 !if defined(BUILD_DIR)
|
|
62 SEPARATE_BUILD=1
|
|
63 SRCROOT=$(MAKEROOT)
|
|
64 BLDROOT=$(BUILD_DIR)
|
|
65 !else
|
|
66 !if defined(SOURCE_DIR)
|
|
67 SEPARATE_BUILD=1
|
|
68 SRCROOT=$(SOURCE_DIR)
|
|
69 BLDROOT=$(MAKEROOT)
|
|
70 !else
|
|
71 SEPARATE_BUILD=0
|
|
72 SRCROOT=$(MAKEROOT)
|
|
73 BLDROOT=$(MAKEROOT)
|
|
74 !endif
|
|
75 !endif
|
|
76
|
|
77 # Program name and version
|
|
78 !include "$(SRCROOT)\version.sh"
|
|
79
|
|
80 ########################### Basic vars referring to directories, both in
|
|
81 ########################### the source and build trees.
|
|
82
|
|
83 LISP=$(SRCROOT)\lisp
|
|
84 LIB_SRC=$(SRCROOT)\lib-src
|
|
85 NT=$(SRCROOT)\nt
|
|
86 SRC=$(SRCROOT)\src
|
|
87 ETC=$(SRCROOT)\etc
|
1346
|
88 INFO=$(SRCROOT)\info
|
1330
|
89
|
|
90 BLDLIB_SRC=$(BLDROOT)\lib-src
|
|
91 BLDNT=$(BLDROOT)\nt
|
|
92 OUTDIR=$(BLDNT)\obj
|
|
93 BLDSRC=$(BLDROOT)\src
|
|
94
|
|
95 # This appears in the dependency file
|
|
96 LWLIB_SRCDIR=$(SRCROOT)\lwlib
|
|
97
|
|
98 ########################### Process the config.inc options.
|
|
99
|
428
|
100 !if !defined(INFODOCK)
|
|
101 INFODOCK=0
|
|
102 !endif
|
771
|
103 !if !defined(MULE)
|
|
104 MULE=0
|
428
|
105 !endif
|
442
|
106 !if !defined(HAVE_MS_WINDOWS)
|
|
107 HAVE_MS_WINDOWS=1
|
428
|
108 !endif
|
|
109 !if !defined(HAVE_XPM)
|
|
110 HAVE_XPM=0
|
|
111 !endif
|
|
112 !if !defined(HAVE_PNG)
|
|
113 HAVE_PNG=0
|
|
114 !endif
|
632
|
115 !if !defined(HAVE_ZLIB)
|
|
116 HAVE_ZLIB=$(HAVE_PNG)
|
|
117 !endif
|
428
|
118 !if !defined(HAVE_TIFF)
|
|
119 HAVE_TIFF=0
|
|
120 !endif
|
|
121 !if !defined(HAVE_JPEG)
|
|
122 HAVE_JPEG=0
|
|
123 !endif
|
|
124 !if !defined(HAVE_XFACE)
|
|
125 HAVE_XFACE=0
|
|
126 !endif
|
|
127 !if !defined(HAVE_GIF)
|
|
128 HAVE_GIF=1
|
|
129 !endif
|
488
|
130 !if !defined(HAVE_GTK)
|
|
131 HAVE_GTK=0
|
|
132 !endif
|
827
|
133 !if !defined(HAVE_MENUBARS)
|
|
134 HAVE_MENUBARS=1
|
|
135 !endif
|
|
136 !if !defined(HAVE_SCROLLBARS)
|
|
137 HAVE_SCROLLBARS=1
|
|
138 !endif
|
428
|
139 !if !defined(HAVE_TOOLBARS)
|
|
140 HAVE_TOOLBARS=$(HAVE_XPM)
|
|
141 !endif
|
|
142 !if !defined(HAVE_DIALOGS)
|
|
143 HAVE_DIALOGS=1
|
|
144 !endif
|
|
145 !if !defined(HAVE_NATIVE_SOUND)
|
|
146 HAVE_NATIVE_SOUND=1
|
|
147 !endif
|
|
148 !if !defined(HAVE_WIDGETS)
|
|
149 HAVE_WIDGETS=1
|
|
150 !endif
|
872
|
151 !if !defined(OPTIMIZED_BUILD)
|
|
152 OPTIMIZED_BUILD=1
|
|
153 !endif
|
|
154 !if !defined(USE_FASTCALL)
|
|
155 # #### Change to 1 when I check in the ws with support for fastcall
|
|
156 USE_FASTCALL=0
|
|
157 !endif
|
|
158 !if !defined(PROFILE_SUPPORT)
|
|
159 PROFILE_SUPPORT=0
|
|
160 !endif
|
428
|
161 !if !defined(DEBUG_XEMACS)
|
|
162 DEBUG_XEMACS=0
|
|
163 !endif
|
1333
|
164 !if !defined(SUPPORT_EDIT_AND_CONTINUE)
|
|
165 SUPPORT_EDIT_AND_CONTINUE=0
|
834
|
166 !endif
|
1203
|
167
|
800
|
168 !if !defined(ERROR_CHECK_ALL)
|
1203
|
169 !if "$(emacs_is_beta)" != ""
|
800
|
170 ERROR_CHECK_ALL=1
|
1203
|
171 !else
|
|
172 ERROR_CHECK_ALL=0
|
|
173 !endif
|
|
174 !endif
|
|
175
|
|
176 !if !defined(CPLUSPLUS_COMPILE)
|
|
177 !if $(ERROR_CHECK_ALL)
|
|
178 CPLUSPLUS_COMPILE=1
|
|
179 !else
|
|
180 CPLUSPLUS_COMPILE=0
|
|
181 !endif
|
|
182 !endif
|
|
183
|
|
184 !if !defined(USE_KKCC)
|
|
185 USE_KKCC=0
|
|
186 !endif
|
2720
|
187 !if !defined(MC_ALLOC)
|
|
188 MC_ALLOC=0
|
|
189 !endif
|
1203
|
190 !if !defined(USE_UNION_TYPE)
|
|
191 USE_UNION_TYPE=0
|
800
|
192 !endif
|
442
|
193 !if !defined(QUICK_BUILD)
|
|
194 QUICK_BUILD=0
|
|
195 !endif
|
872
|
196 !if !defined(VERBOSECC)
|
|
197 VERBOSECC=0
|
|
198 !endif
|
|
199 !if !defined(DEPEND)
|
|
200 DEPEND=0
|
|
201 !endif
|
|
202 !if !defined(USE_PORTABLE_DUMPER)
|
|
203 USE_PORTABLE_DUMPER=1
|
|
204 !endif
|
438
|
205 !if !defined(USE_MINITAR)
|
632
|
206 USE_MINITAR=$(HAVE_ZLIB)
|
438
|
207 !endif
|
428
|
208
|
440
|
209 # A little bit of adhockery. Default to use system malloc and
|
|
210 # DLL version of the C runtime library when using portable
|
|
211 # dumping. These are the optimal settings.
|
2500
|
212 #
|
|
213 # NOTE: The various graphics libraries are generally compiled to use
|
|
214 # MSVCRT.DLL (the same that we use in USE_CRTDLL, more or less), so using
|
|
215 # this is a good thing.
|
|
216
|
440
|
217 !if !defined(USE_SYSTEM_MALLOC)
|
|
218 USE_SYSTEM_MALLOC=$(USE_PORTABLE_DUMPER)
|
|
219 !endif
|
|
220 !if !defined(USE_CRTDLL)
|
|
221 USE_CRTDLL=$(USE_PORTABLE_DUMPER)
|
|
222 !endif
|
|
223
|
1330
|
224 ########################### Check for incompatible options.
|
428
|
225
|
|
226 CONFIG_ERROR=0
|
|
227 !if $(INFODOCK) && !exist("..\..\Infodock.rules")
|
|
228 !message Cannot build InfoDock without InfoDock sources
|
|
229 CONFIG_ERROR=1
|
|
230 !endif
|
440
|
231 !if !$(USE_PORTABLE_DUMPER) && $(USE_SYSTEM_MALLOC)
|
|
232 !message Cannot use system allocator when dumping old way, use portable dumper.
|
|
233 CONFIG_ERROR=1
|
|
234 !endif
|
|
235 !if !$(USE_PORTABLE_DUMPER) && $(USE_CRTDLL)
|
|
236 !message Cannot use C runtime DLL when dumping old way, use portable dumper.
|
|
237 CONFIG_ERROR=1
|
|
238 !endif
|
|
239 !if !$(USE_SYSTEM_MALLOC) && $(USE_CRTDLL)
|
|
240 !message GNU malloc currently cannot be used with CRT DLL.
|
|
241 !message [[[Developer note: If you want to fix it, read Q112297 first]]] ####
|
|
242 CONFIG_ERROR=1
|
|
243 !endif
|
1330
|
244 !if !$(HAVE_MS_WINDOWS) && !$(HAVE_GTK)
|
|
245 !message Please specify at least one HAVE_MS_WINDOWS=1 and/or HAVE_GTK=1
|
428
|
246 CONFIG_ERROR=1
|
|
247 !endif
|
488
|
248 !if $(HAVE_MS_WINDOWS) && $(HAVE_GTK) && !defined(GTK_DIR)
|
|
249 !message Please specify root directory for your GTK installation: GTK_DIR=path
|
|
250 CONFIG_ERROR=1
|
|
251 !endif
|
442
|
252 !if $(HAVE_MS_WINDOWS) && $(HAVE_XPM) && !defined(XPM_DIR)
|
428
|
253 !message Please specify root directory for your XPM installation: XPM_DIR=path
|
|
254 CONFIG_ERROR=1
|
|
255 !endif
|
442
|
256 !if $(HAVE_MS_WINDOWS) && $(HAVE_XPM) && defined(XPM_DIR) && !exist("$(XPM_DIR)\lib\Xpm.lib")
|
428
|
257 !message Specified XPM directory does not contain "$(XPM_DIR)\lib\Xpm.lib"
|
|
258 CONFIG_ERROR=1
|
|
259 !endif
|
442
|
260 !if $(HAVE_MS_WINDOWS) && $(HAVE_PNG) && !defined(PNG_DIR)
|
428
|
261 !message Please specify root directory for your PNG installation: PNG_DIR=path
|
|
262 CONFIG_ERROR=1
|
|
263 !endif
|
442
|
264 !if $(HAVE_MS_WINDOWS) && $(HAVE_PNG) && defined(PNG_DIR) && !exist("$(PNG_DIR)\libpng.lib")
|
428
|
265 !message Specified PNG directory does not contain "$(PNG_DIR)\libpng.lib"
|
|
266 CONFIG_ERROR=1
|
|
267 !endif
|
442
|
268 !if $(HAVE_MS_WINDOWS) && $(HAVE_PNG) && !defined(ZLIB_DIR)
|
428
|
269 !message Please specify root directory for your ZLIB installation: ZLIB_DIR=path
|
|
270 CONFIG_ERROR=1
|
|
271 !endif
|
442
|
272 !if $(HAVE_MS_WINDOWS) && $(HAVE_PNG) && defined(ZLIB_DIR) && !exist("$(ZLIB_DIR)\zlib.lib")
|
428
|
273 !message Specified ZLIB directory does not contain "$(ZLIB_DIR)\zlib.lib"
|
|
274 CONFIG_ERROR=1
|
|
275 !endif
|
442
|
276 !if $(HAVE_MS_WINDOWS) && $(HAVE_TIFF) && !defined(TIFF_DIR)
|
428
|
277 !message Please specify root directory for your TIFF installation: TIFF_DIR=path
|
|
278 CONFIG_ERROR=1
|
|
279 !endif
|
442
|
280 !if $(HAVE_MS_WINDOWS) && $(HAVE_TIFF) && !exist("$(TIFF_DIR)\libtiff\libtiff.lib")
|
428
|
281 !message Specified TIFF directory does not contain "$(TIFF_DIR)\libtiff\libtiff.lib"
|
|
282 CONFIG_ERROR=1
|
|
283 !endif
|
442
|
284 !if $(HAVE_MS_WINDOWS) && $(HAVE_JPEG) && !defined(JPEG_DIR)
|
428
|
285 !message Please specify root directory for your JPEG installation: JPEG_DIR=path
|
|
286 CONFIG_ERROR=1
|
|
287 !endif
|
442
|
288 !if $(HAVE_MS_WINDOWS) && $(HAVE_JPEG) && !exist("$(JPEG_DIR)\libjpeg.lib")
|
428
|
289 !message Specified JPEG directory does not contain "$(JPEG_DIR)\libjpeg.lib"
|
|
290 CONFIG_ERROR=1
|
|
291 !endif
|
442
|
292 !if $(HAVE_MS_WINDOWS) && $(HAVE_XFACE) && !defined(COMPFACE_DIR)
|
428
|
293 !message Please specify root directory for your COMPFACE installation: COMPFACE_DIR=path
|
|
294 CONFIG_ERROR=1
|
|
295 !endif
|
442
|
296 !if $(HAVE_MS_WINDOWS) && $(HAVE_XFACE) && !exist("$(COMPFACE_DIR)\libcompface.lib")
|
428
|
297 !message Specified COMPFACE directory does not contain "$(COMPFACE_DIR)\libcompface.lib"
|
|
298 CONFIG_ERROR=1
|
|
299 !endif
|
442
|
300 !if $(HAVE_MS_WINDOWS) && $(HAVE_TOOLBARS) && !$(HAVE_XPM)
|
428
|
301 !message Toolbars require XPM support
|
|
302 CONFIG_ERROR=1
|
|
303 !endif
|
|
304 !if $(CONFIG_ERROR)
|
|
305 !error Configuration error(s) found
|
|
306 !endif
|
|
307
|
1330
|
308 ########################### Set version strings.
|
|
309
|
|
310 !if $(INFODOCK)
|
|
311 INFODOCK_VERSION_STRING=$(infodock_major_version).$(infodock_minor_version).$(infodock_build_version)
|
|
312 PROGRAM_DEFINES=-DINFODOCK \
|
|
313 -DPATH_VERSION=\"$(INFODOCK_VERSION_STRING)\" \
|
|
314 -DPATH_PROGNAME=\"infodock\" \
|
|
315 -DEMACS_PROGNAME=\"infodock\" \
|
|
316 -DEMACS_VERSION=\"$(INFODOCK_VERSION_STRING)\" \
|
|
317 -DINFODOCK_MAJOR_VERSION=$(infodock_major_version) \
|
|
318 -DINFODOCK_MINOR_VERSION=$(infodock_minor_version) \
|
|
319 -DINFODOCK_BUILD_VERSION=$(infodock_build_version)
|
|
320 !else
|
|
321 XEMACS_VERSION_STRING=$(emacs_major_version).$(emacs_minor_version)
|
|
322 !if "$(emacs_beta_version)" != ""
|
|
323 !if "$(emacs_is_beta)" != ""
|
|
324 XEMACS_VERSION_STRING=$(XEMACS_VERSION_STRING)-b$(emacs_beta_version)
|
|
325 !else
|
|
326 XEMACS_VERSION_STRING=$(XEMACS_VERSION_STRING).$(emacs_beta_version)
|
|
327 !endif
|
|
328 !endif
|
|
329 PROGRAM_DEFINES= \
|
|
330 -DPATH_VERSION=\"$(XEMACS_VERSION_STRING)\" \
|
|
331 -DPATH_PROGNAME=\"xemacs\" \
|
|
332 -DEMACS_VERSION=\"$(XEMACS_VERSION_STRING)\" \
|
|
333 -DEMACS_PROGNAME=\"xemacs\"
|
|
334 !endif
|
|
335
|
|
336 ########################### Set up installation and package directories.
|
|
337
|
|
338 !if !defined(INSTALL_DIR)
|
|
339 ! if $(INFODOCK)
|
|
340 INSTALL_DIR=c:\Program Files\Infodock\Infodock-$(INFODOCK_VERSION_STRING)
|
|
341 ! else
|
|
342 INSTALL_DIR=c:\Program Files\XEmacs\XEmacs-$(XEMACS_VERSION_STRING)
|
442
|
343 ! endif
|
1330
|
344 !endif
|
|
345 !if !defined(PACKAGE_PATH)
|
|
346 ! if !defined(PACKAGE_PREFIX)
|
|
347 PACKAGE_PREFIX=c:\Program Files\XEmacs
|
442
|
348 ! endif
|
1330
|
349 ! if $(MULE)
|
|
350 PACKAGE_PATH=~\.xemacs;;$(PACKAGE_PREFIX)\site-packages;$(PACKAGE_PREFIX)\mule-packages;$(PACKAGE_PREFIX)\xemacs-packages
|
|
351 ! else
|
|
352 PACKAGE_PATH=~\.xemacs;;$(PACKAGE_PREFIX)\site-packages;$(PACKAGE_PREFIX)\xemacs-packages
|
442
|
353 ! endif
|
|
354 !endif
|
1330
|
355 PATH_PACKAGEPATH="$(PACKAGE_PATH:\=\\)"
|
|
356
|
|
357 !if $(INFODOCK)
|
|
358 PATH_PREFIX=../..
|
|
359 !else
|
|
360 PATH_PREFIX=..
|
|
361 !endif
|
|
362
|
|
363 PATH_DEFINES=-DPATH_PREFIX=\"$(PATH_PREFIX)\"
|
|
364
|
|
365 !if $(SEPARATE_BUILD)
|
1346
|
366 PATH_DEFINES=$(PATH_DEFINES) -DPATH_LOADSEARCH=\"$(LISP:\=\\)\" -DPATH_DATA=\"$(ETC:\=\\)\" -DPATH_INFO=\"$(INFO:\=\\)\"
|
1330
|
367 !endif
|
|
368
|
|
369 ########################### Determine system configuration.
|
|
370
|
|
371 !if !defined(OS)
|
|
372 OS=Windows_95/98
|
|
373 EMACS_CONFIGURATION=i586-pc-win32
|
|
374 !else if "$(PROCESSOR_ARCHITECTURE)" == "x86"
|
|
375 EMACS_CONFIGURATION=i586-pc-win32
|
|
376 !else if "$(PROCESSOR_ARCHITECTURE)" == "MIPS"
|
|
377 EMACS_CONFIGURATION=mips-pc-win32
|
|
378 !else if "$(PROCESSOR_ARCHITECTURE)" == "ALPHA"
|
|
379 EMACS_CONFIGURATION=alpha-pc-win32
|
|
380 !else if "$(PROCESSOR_ARCHITECTURE)" == "PPC"
|
|
381 EMACS_CONFIGURATION=ppc-pc-win32
|
|
382 !else
|
|
383 ! error Unknown processor architecture type $(PROCESSOR_ARCHITECTURE)
|
|
384 !endif
|
|
385 STACK_TRACE_EYE_CATCHER=$(XEMACS_VERSION_STRING:.=_)
|
|
386 STACK_TRACE_EYE_CATCHER=xemacs_$(STACK_TRACE_EYE_CATCHER:-=_)_$(EMACS_CONFIGURATION:-=_)
|
|
387 PROGRAM_DEFINES=$(PROGRAM_DEFINES) -DSTACK_TRACE_EYE_CATCHER=$(STACK_TRACE_EYE_CATCHER)
|
|
388
|
|
389 ########################### Determine includes/defines/object file for
|
|
390 ########################### various options.
|
|
391
|
|
392 !if $(HAVE_MS_WINDOWS)
|
|
393 MSW_DEFINES=-DHAVE_MS_WINDOWS
|
|
394 MSW_INCLUDES=
|
|
395 MSW_LIBS=comctl32.lib
|
|
396
|
|
397 !if $(HAVE_XPM)
|
|
398 MSW_DEFINES=$(MSW_DEFINES) -DHAVE_XPM -DFOR_MSW
|
|
399 MSW_INCLUDES=$(MSW_INCLUDES) -I"$(XPM_DIR)" -I"$(XPM_DIR)\lib"
|
|
400 MSW_LIBS=$(MSW_LIBS) "$(XPM_DIR)\lib\Xpm.lib"
|
|
401 !endif
|
|
402 !if $(HAVE_GIF)
|
|
403 MSW_DEFINES=$(MSW_DEFINES) -DHAVE_GIF
|
|
404 MSW_GIF_OBJ=$(OUTDIR)\dgif_lib.obj $(OUTDIR)\gif_io.obj
|
|
405 !endif
|
|
406 !if $(HAVE_PNG)
|
|
407 MSW_DEFINES=$(MSW_DEFINES) -DHAVE_PNG
|
|
408 MSW_INCLUDES=$(MSW_INCLUDES) -I"$(PNG_DIR)" -I"$(ZLIB_DIR)"
|
|
409 MSW_LIBS=$(MSW_LIBS) "$(PNG_DIR)\libpng.lib" "$(ZLIB_DIR)\zlib.lib"
|
|
410 !endif
|
|
411 !if $(HAVE_TIFF)
|
|
412 MSW_DEFINES=$(MSW_DEFINES) -DHAVE_TIFF
|
|
413 MSW_INCLUDES=$(MSW_INCLUDES) -I"$(TIFF_DIR)\libtiff"
|
|
414 MSW_LIBS=$(MSW_LIBS) "$(TIFF_DIR)\libtiff\libtiff.lib"
|
|
415 !endif
|
|
416 !if $(HAVE_JPEG)
|
|
417 MSW_DEFINES=$(MSW_DEFINES) -DHAVE_JPEG
|
|
418 MSW_INCLUDES=$(MSW_INCLUDES) -I"$(JPEG_DIR)"
|
|
419 MSW_LIBS=$(MSW_LIBS) "$(JPEG_DIR)\libjpeg.lib"
|
|
420 !endif
|
|
421 !if $(HAVE_XFACE)
|
|
422 MSW_DEFINES=$(MSW_DEFINES) -DHAVE_XFACE
|
|
423 MSW_INCLUDES=$(MSW_INCLUDES) -I"$(COMPFACE_DIR)"
|
|
424 MSW_LIBS=$(MSW_LIBS) "$(COMPFACE_DIR)\libcompface.lib"
|
|
425 !endif
|
|
426 !if $(HAVE_ZLIB)
|
|
427 MSW_DEFINES=$(MSW_DEFINES) -DHAVE_ZLIB
|
|
428 MSW_INCLUDES=$(MSW_INCLUDES) -I"$(ZLIB_DIR)"
|
|
429 MSW_LIBS=$(MSW_LIBS) "$(ZLIB_DIR)\zlib.lib"
|
|
430 !endif
|
|
431 !if $(HAVE_MENUBARS)
|
|
432 MSW_DEFINES=$(MSW_DEFINES) -DHAVE_MENUBARS
|
|
433 MSW_MENUBAR_OBJ=$(OUTDIR)\menubar.obj $(OUTDIR)\menubar-msw.obj
|
|
434 !endif
|
|
435 !if $(HAVE_SCROLLBARS)
|
|
436 MSW_DEFINES=$(MSW_DEFINES) -DHAVE_SCROLLBARS
|
|
437 MSW_SCROLLBAR_OBJ=$(OUTDIR)\scrollbar.obj $(OUTDIR)\scrollbar-msw.obj
|
|
438 !endif
|
|
439 !if $(HAVE_TOOLBARS)
|
|
440 MSW_DEFINES=$(MSW_DEFINES) -DHAVE_TOOLBARS
|
|
441 MSW_TOOLBAR_OBJ=$(OUTDIR)\toolbar.obj $(OUTDIR)\toolbar-msw.obj
|
|
442 !endif
|
|
443 !if $(HAVE_WIDGETS)
|
|
444 MSW_DEFINES=$(MSW_DEFINES) -DHAVE_WIDGETS
|
|
445 !endif
|
|
446 !if $(HAVE_DIALOGS)
|
|
447 MSW_DEFINES=$(MSW_DEFINES) -DHAVE_DIALOGS
|
|
448 MSW_DIALOG_OBJ=$(OUTDIR)\dialog.obj $(OUTDIR)\dialog-msw.obj
|
|
449 !endif
|
|
450 !if $(HAVE_NATIVE_SOUND)
|
|
451 MSW_DEFINES=$(MSW_DEFINES) -DHAVE_NATIVE_SOUND
|
|
452 !endif
|
|
453
|
|
454 TEMACS_MSW_OBJS=\
|
|
455 $(OUTDIR)\console-msw.obj \
|
|
456 $(OUTDIR)\device-msw.obj \
|
|
457 $(OUTDIR)\event-msw.obj \
|
|
458 $(OUTDIR)\frame-msw.obj \
|
|
459 $(OUTDIR)\glyphs-msw.obj \
|
|
460 $(OUTDIR)\gui-msw.obj \
|
|
461 $(OUTDIR)\objects-msw.obj \
|
|
462 $(OUTDIR)\redisplay-msw.obj \
|
|
463 $(OUTDIR)\select-msw.obj \
|
|
464 $(OUTDIR)\dired-msw.obj \
|
|
465 $(MSW_MENUBAR_OBJ) \
|
|
466 $(MSW_SCROLLBAR_OBJ) \
|
|
467 $(MSW_TOOLBAR_OBJ) \
|
|
468 $(MSW_DIALOG_OBJ) \
|
|
469 $(MSW_GIF_OBJ)
|
|
470
|
|
471 # end !if $(HAVE_MS_WINDOWS)
|
|
472 !endif
|
|
473
|
|
474 !if $(MULE)
|
|
475 MULE_DEFINES=-DMULE
|
|
476 TEMACS_MULE_OBJS=\
|
|
477 $(OUTDIR)\mule-ccl.obj \
|
|
478 $(OUTDIR)\mule-charset.obj \
|
|
479 $(OUTDIR)\mule-coding.obj
|
|
480 !endif
|
|
481
|
|
482 !if $(DEBUG_XEMACS)
|
|
483 TEMACS_DEBUG_OBJS=$(OUTDIR)\debug.obj $(OUTDIR)\tests.obj
|
|
484 !endif
|
|
485
|
|
486 !if $(QUICK_BUILD)
|
|
487 QUICK_DEFINES=-DQUICK_BUILD
|
|
488 !endif
|
|
489
|
|
490 !if $(ERROR_CHECK_ALL)
|
|
491 ERROR_CHECK_DEFINES=-DERROR_CHECK_ALL
|
|
492 !endif
|
|
493
|
|
494 !if $(USE_UNION_TYPE)
|
|
495 UNION_DEFINES=-DUSE_UNION_TYPE
|
|
496 !endif
|
|
497
|
|
498 !if $(USE_PORTABLE_DUMPER)
|
|
499 DUMPER_DEFINES=-DPDUMP
|
|
500 TEMACS_DUMP_OBJS=$(OUTDIR)\dumper.obj
|
|
501 !else
|
|
502 TEMACS_DUMP_OBJS=$(OUTDIR)\unexnt.obj
|
|
503 !endif
|
|
504
|
|
505 !if $(USE_KKCC)
|
|
506 KKCC_DEFINES=-DUSE_KKCC
|
|
507 !endif
|
|
508
|
2720
|
509 !if $(MC_ALLOC)
|
|
510 MC_ALLOC_DEFINES=-DMC_ALLOC
|
|
511 TEMACS_MC_ALLOC_OBJS=$(OUTDIR)\mc-alloc.obj
|
|
512 !endif
|
|
513
|
1330
|
514 !if $(USE_SYSTEM_MALLOC)
|
|
515 MALLOC_DEFINES=-DSYSTEM_MALLOC
|
|
516 !else
|
|
517 MALLOC_DEFINES=-DGNU_MALLOC
|
|
518 TEMACS_ALLOC_OBJS=$(OUTDIR)\free-hook.obj $(OUTDIR)\gmalloc.obj \
|
|
519 $(OUTDIR)\ntheap.obj $(OUTDIR)\vm-limit.obj
|
|
520 !endif
|
|
521
|
|
522 ########################### Process options related to compilation.
|
442
|
523
|
|
524 #
|
428
|
525 # Compiler command echo control. Define VERBOSECC=1 to get verbose compilation.
|
|
526 #
|
|
527 !if $(VERBOSECC)
|
|
528 CCV=$(CC)
|
|
529 !else
|
|
530 CCV=@$(CC)
|
|
531 !endif
|
|
532
|
|
533 !if $(DEBUG_XEMACS)
|
814
|
534
|
872
|
535 # ---- Debugging support ----
|
1333
|
536 ! if $(SUPPORT_EDIT_AND_CONTINUE)
|
872
|
537 # support edit-and-continue
|
|
538 DEBUG_FLAGS_COMPILE=-ZI
|
1333
|
539 # WARNING: There is a very good reason for -incremental:no, as it can cause
|
|
540 # all sorts of weird crashes in or after a pdump load. We must allow
|
|
541 # incremental linking for edit-and-continue to work, however.
|
|
542 DEBUG_FLAGS_LINK=-debug:full
|
872
|
543 ! else
|
|
544 DEBUG_FLAGS_COMPILE=-Zi
|
1333
|
545 DEBUG_FLAGS_LINK=-debug:full -incremental:no
|
872
|
546 ! endif
|
|
547 DEBUG_DEFINES=-DDEBUG_XEMACS -D_DEBUG
|
|
548 #BROWSERFLAGS=-Fr -Fd$(OUTDIR)\temacs.pdb
|
|
549 BROWSERFLAGS=-Fr$*.sbr -Fd$(OUTDIR)\temacs.pdb
|
|
550
|
814
|
551 !else
|
872
|
552
|
|
553 # ---- No debugging support ----
|
|
554 DEBUG_FLAGS_COMPILE=
|
|
555 DEBUG_FLAGS_LINK=-incremental:no
|
882
|
556 DEBUG_DEFINES=
|
872
|
557 BROWSERFLAGS=
|
|
558
|
428
|
559 !endif
|
|
560
|
440
|
561 !if $(USE_CRTDLL)
|
872
|
562 ! if $(DEBUG_XEMACS)
|
440
|
563 C_LIBFLAG=-MDd
|
|
564 LIBC_LIB=msvcrtd.lib
|
872
|
565 ! else
|
440
|
566 C_LIBFLAG=-MD
|
|
567 LIBC_LIB=msvcrt.lib
|
872
|
568 ! endif
|
440
|
569 !else
|
|
570 C_LIBFLAG=-ML
|
|
571 LIBC_LIB=libc.lib
|
|
572 !endif
|
|
573
|
872
|
574 !if $(OPTIMIZED_BUILD)
|
|
575 # -G5 means optimize for Pentium. (According to the code-optimization
|
|
576 # article, -GB is the same as -G5, and -G6, i.e. optimze for Pentium Pro,
|
|
577 # gains you little over -G5 for PPro's but causes big slowdowns for
|
|
578 # Pentiums.) -GF means put strings in read-only memory; -Gr means use
|
|
579 # fastcall convention. Another possible addition: -Ob2 -- allows inlining
|
|
580 # of any function, not just those declared inline. Potential code size
|
|
581 # increase, though.
|
|
582 #
|
|
583 # #### Note: fastcall doesn't actually seem to make any difference, at least
|
|
584 # not using the (admittedly unscientific) test of (hanoi 6). The
|
|
585 # optimization article claims 1-2% improvement in both speed and size.
|
|
586 OPTFLAGS_FASTCALL =-O2 -G5 -Gr -Ob2
|
|
587 OPTFLAGS_CDECL =-O2 -G5 -Ob2
|
|
588 !else
|
|
589 OPTFLAGS_FASTCALL =-Od
|
|
590 OPTFLAGS_CDECL =-Od
|
|
591 !endif
|
|
592
|
|
593 !if $(USE_FASTCALL)
|
|
594 OPTFLAGS = $(OPTFLAGS_FASTCALL)
|
|
595 !else
|
|
596 OPTFLAGS = $(OPTFLAGS_CDECL)
|
|
597 !endif
|
|
598
|
|
599 !if $(PROFILE_SUPPORT)
|
|
600 PROFILE_FLAGS=-profile
|
|
601 !else
|
|
602 PROFILE_FLAGS=
|
|
603 !endif
|
|
604
|
1203
|
605 !if $(CPLUSPLUS_COMPILE)
|
|
606 CPLUSPLUS_COMPILE_FLAGS=-TP
|
|
607 !else
|
|
608 CPLUSPLUS_COMPILE_FLAGS=
|
|
609 !endif
|
|
610
|
1330
|
611 ########################### Determine generic includes/defines/flags.
|
|
612
|
2500
|
613 INCLUDES=-I$(NT)\inc -I$(SRC) $(MSW_INCLUDES)
|
1330
|
614
|
|
615 DEFINES=$(MSW_DEFINES) $(MULE_DEFINES) $(UNION_DEFINES) \
|
2720
|
616 $(DUMPER_DEFINES) $(KKCC_DEFINES) $(MC_ALLOC_DEFINES) \
|
|
617 $(MALLOC_DEFINES) $(QUICK_DEFINES) $(ERROR_CHECK_DEFINES) \
|
|
618 $(DEBUG_DEFINES) -DWIN32_LEAN_AND_MEAN -DWIN32_NATIVE -Demacs \
|
1330
|
619 -DHAVE_CONFIG_H $(PROGRAM_DEFINES) $(PATH_DEFINES)
|
|
620
|
872
|
621 CFLAGS_NO_OPT=-nologo -W3 -DSTRICT $(DEBUG_FLAGS_COMPILE)
|
|
622
|
|
623 CFLAGS_NO_LIB=$(CFLAGS_NO_OPT) $(OPTFLAGS)
|
826
|
624 CFLAGS=$(CFLAGS_NO_LIB) $(C_LIBFLAG)
|
|
625
|
872
|
626 CFLAGS_CDECL_NO_LIB=$(CFLAGS_NO_OPT) $(OPTFLAGS_CDECL)
|
|
627 CFLAGS_CDECL=$(CFLAGS_CDECL_NO_LIB) $(C_LIBFLAG)
|
|
628
|
1330
|
629 ########################### Determine flags for XEmacs object files.
|
428
|
630
|
|
631 # This may not exist
|
|
632 !if "$(emacs_beta_version)" != ""
|
496
|
633 !if "$(emacs_is_beta)" != ""
|
428
|
634 EMACS_BETA_VERSION=-DEMACS_BETA_VERSION=$(emacs_beta_version)
|
496
|
635 !else
|
|
636 EMACS_PATCH_LEVEL=-DEMACS_PATCH_LEVEL=$(emacs_beta_version)
|
|
637 !endif
|
|
638 !endif
|
428
|
639
|
1203
|
640 TEMACS_CPP_FLAGS_NO_CFLAGS=-c $(CPLUSPLUS_COMPILE_FLAGS) \
|
1330
|
641 $(INCLUDES) $(DEFINES) \
|
428
|
642 -DEMACS_MAJOR_VERSION=$(emacs_major_version) \
|
|
643 -DEMACS_MINOR_VERSION=$(emacs_minor_version) \
|
1330
|
644 $(EMACS_BETA_VERSION) $(EMACS_PATCH_LEVEL) \
|
442
|
645 -DXEMACS_CODENAME=\"$(xemacs_codename:&=and)\" \
|
2106
|
646 !if defined(xemacs_extra_name)
|
|
647 -DXEMACS_EXTRA_NAME=\"$(xemacs_extra_name:"=)\" \
|
|
648 !endif
|
428
|
649 -DEMACS_CONFIGURATION=\"$(EMACS_CONFIGURATION)\" \
|
|
650 -DPATH_PACKAGEPATH=\"$(PATH_PACKAGEPATH)\"
|
872
|
651 TEMACS_CPP_FLAGS=$(CFLAGS) $(TEMACS_CPP_FLAGS_NO_CFLAGS)
|
|
652 TEMACS_CPP_CDECL_FLAGS=$(CFLAGS_CDECL) $(TEMACS_CPP_FLAGS_NO_CFLAGS)
|
428
|
653
|
1330
|
654 ########################### Determine XEmacs object files.
|
428
|
655
|
|
656 TEMACS_OBJS= \
|
|
657 $(TEMACS_MSW_OBJS)\
|
|
658 $(TEMACS_MULE_OBJS)\
|
|
659 $(TEMACS_DEBUG_OBJS)\
|
440
|
660 $(TEMACS_ALLOC_OBJS)\
|
|
661 $(TEMACS_DUMP_OBJS)\
|
2720
|
662 $(TEMACS_MC_ALLOC_OBJS)\
|
428
|
663 $(OUTDIR)\abbrev.obj \
|
|
664 $(OUTDIR)\alloc.obj \
|
851
|
665 $(OUTDIR)\alloca.obj \
|
428
|
666 $(OUTDIR)\blocktype.obj \
|
|
667 $(OUTDIR)\buffer.obj \
|
|
668 $(OUTDIR)\bytecode.obj \
|
|
669 $(OUTDIR)\callint.obj \
|
|
670 $(OUTDIR)\casefiddle.obj \
|
|
671 $(OUTDIR)\casetab.obj \
|
|
672 $(OUTDIR)\chartab.obj \
|
|
673 $(OUTDIR)\cmdloop.obj \
|
|
674 $(OUTDIR)\cmds.obj \
|
|
675 $(OUTDIR)\console-stream.obj \
|
|
676 $(OUTDIR)\console.obj \
|
|
677 $(OUTDIR)\data.obj \
|
|
678 $(OUTDIR)\device.obj \
|
|
679 $(OUTDIR)\dired.obj \
|
|
680 $(OUTDIR)\doc.obj \
|
|
681 $(OUTDIR)\doprnt.obj \
|
|
682 $(OUTDIR)\dragdrop.obj \
|
|
683 $(OUTDIR)\dynarr.obj \
|
|
684 $(OUTDIR)\editfns.obj \
|
|
685 $(OUTDIR)\elhash.obj \
|
|
686 $(OUTDIR)\emacs.obj \
|
1754
|
687 $(OUTDIR)\emodules.obj \
|
428
|
688 $(OUTDIR)\eval.obj \
|
|
689 $(OUTDIR)\event-stream.obj \
|
|
690 $(OUTDIR)\events.obj \
|
|
691 $(OUTDIR)\extents.obj \
|
|
692 $(OUTDIR)\faces.obj \
|
|
693 $(OUTDIR)\file-coding.obj \
|
|
694 $(OUTDIR)\fileio.obj \
|
|
695 $(OUTDIR)\filemode.obj \
|
|
696 $(OUTDIR)\floatfns.obj \
|
|
697 $(OUTDIR)\fns.obj \
|
|
698 $(OUTDIR)\font-lock.obj \
|
|
699 $(OUTDIR)\frame.obj \
|
|
700 $(OUTDIR)\general.obj \
|
442
|
701 $(OUTDIR)\getloadavg.obj \
|
428
|
702 $(OUTDIR)\glyphs.obj \
|
|
703 $(OUTDIR)\glyphs-eimage.obj \
|
587
|
704 $(OUTDIR)\glyphs-shared.obj \
|
428
|
705 $(OUTDIR)\glyphs-widget.obj \
|
|
706 $(OUTDIR)\gui.obj \
|
|
707 $(OUTDIR)\gutter.obj \
|
|
708 $(OUTDIR)\hash.obj \
|
|
709 $(OUTDIR)\indent.obj \
|
|
710 $(OUTDIR)\imgproc.obj \
|
|
711 $(OUTDIR)\insdel.obj \
|
|
712 $(OUTDIR)\intl.obj \
|
771
|
713 $(OUTDIR)\intl-win32.obj \
|
|
714 $(OUTDIR)\intl-encap-win32.obj \
|
|
715 $(OUTDIR)\intl-auto-encap-win32.obj \
|
428
|
716 $(OUTDIR)\keymap.obj \
|
872
|
717 $(OUTDIR)\libinterface.obj \
|
428
|
718 $(OUTDIR)\line-number.obj \
|
|
719 $(OUTDIR)\lread.obj \
|
|
720 $(OUTDIR)\lstream.obj \
|
|
721 $(OUTDIR)\macros.obj \
|
|
722 $(OUTDIR)\marker.obj \
|
|
723 $(OUTDIR)\md5.obj \
|
|
724 $(OUTDIR)\minibuf.obj \
|
872
|
725 # #### Leave the next one out when integrating my working ws
|
428
|
726 $(OUTDIR)\nt.obj \
|
|
727 $(OUTDIR)\ntplay.obj \
|
|
728 $(OUTDIR)\objects.obj \
|
|
729 $(OUTDIR)\opaque.obj \
|
|
730 $(OUTDIR)\print.obj \
|
|
731 $(OUTDIR)\process.obj \
|
|
732 $(OUTDIR)\process-nt.obj \
|
|
733 $(OUTDIR)\profile.obj \
|
|
734 $(OUTDIR)\rangetab.obj \
|
|
735 $(OUTDIR)\realpath.obj \
|
|
736 $(OUTDIR)\redisplay-output.obj \
|
|
737 $(OUTDIR)\redisplay.obj \
|
|
738 $(OUTDIR)\regex.obj \
|
|
739 $(OUTDIR)\search.obj \
|
|
740 $(OUTDIR)\select.obj \
|
|
741 $(OUTDIR)\signal.obj \
|
|
742 $(OUTDIR)\sound.obj \
|
|
743 $(OUTDIR)\specifier.obj \
|
|
744 $(OUTDIR)\strftime.obj \
|
|
745 $(OUTDIR)\symbols.obj \
|
|
746 $(OUTDIR)\syntax.obj \
|
|
747 $(OUTDIR)\sysdep.obj \
|
771
|
748 $(OUTDIR)\text.obj \
|
428
|
749 $(OUTDIR)\tparam.obj \
|
|
750 $(OUTDIR)\undo.obj \
|
771
|
751 $(OUTDIR)\unicode.obj \
|
428
|
752 $(OUTDIR)\widget.obj \
|
|
753 $(OUTDIR)\window.obj \
|
442
|
754 $(OUTDIR)\win32.obj
|
428
|
755
|
1330
|
756 #########################################################################
|
|
757 ## Implicit rules ##
|
|
758 #########################################################################
|
|
759
|
428
|
760 # Rules
|
|
761
|
|
762 .SUFFIXES:
|
430
|
763 .SUFFIXES: .c .obj .texi .info
|
428
|
764
|
872
|
765 # nmake rule with batching:
|
1330
|
766 #{$(SRC)}.c{$(OUTDIR)}.obj:
|
872
|
767 # echo $< >> $(OUTDIR)\listfile.tmp
|
|
768
|
1330
|
769 {$(SRC)}.c{$(OUTDIR)}.obj:
|
872
|
770 $(CCV) $(TEMACS_CPP_FLAGS) $< -Fo$@ $(BROWSERFLAGS)
|
428
|
771
|
1330
|
772 #########################################################################
|
|
773 ## Subsidiary dependency rules ##
|
|
774 #########################################################################
|
|
775
|
|
776 ###################### Include auto-generated dependencies.
|
|
777
|
|
778 #
|
|
779 # Whether to use dependency information generated by make-src-depend
|
|
780 #
|
|
781 !if $(DEPEND) && exist("$(SRC)\depend")
|
|
782 ! if [if not exist $(OUTDIR)\nul mkdir "$(OUTDIR)"]
|
|
783 ! endif
|
|
784 # This perl script used to be inline but that caused too many quoting problems
|
|
785 ! if [perl $(NT)\make-nt-depend -s=$(SRC) -c=$(NT) -o=$(OUTDIR) < $(SRC)\depend > $(OUTDIR)\depend.tmp]
|
|
786 ! endif
|
|
787 ! include "$(OUTDIR)\depend.tmp"
|
|
788 !else
|
|
789 ! if [echo WARNING: Compiling without dependency information.]
|
|
790 ! endif
|
|
791 !endif
|
|
792
|
|
793 ###################### Build the output directory structure if not same as
|
|
794 ###################### source.
|
|
795
|
|
796 !if $(SEPARATE_BUILD)
|
|
797 # #### `if not exist' does not like the quotes around file names.
|
|
798 # But what if one of them has spaces? Fucking Microsoft!
|
|
799 ! if [if not exist $(BLDROOT)\nul mkdir "$(BLDROOT)"]
|
|
800 ! endif
|
|
801 ! if [if not exist $(BLDLIB_SRC)\nul mkdir "$(BLDLIB_SRC)"]
|
|
802 ! endif
|
|
803 ! if [if not exist $(BLDNT)\nul mkdir "$(BLDNT)"]
|
|
804 ! endif
|
|
805 ! if [if not exist $(OUTDIR)\nul mkdir "$(OUTDIR)"]
|
|
806 ! endif
|
|
807 ! if [if not exist $(BLDSRC)\nul mkdir "$(BLDSRC)"]
|
|
808 ! endif
|
|
809 # No point.
|
|
810 # ! if [if not exist "$(BLDROOT)\nul" mkdir "$(BLDROOT)"]
|
|
811 # ! endif
|
|
812 !endif
|
|
813
|
|
814 ###################### Random .obj dependencies
|
|
815
|
872
|
816 # An explicit rule looks like this ($< works only in implicit rules):
|
1330
|
817 # $(OUTDIR)\foo.obj: $(SRC)\foo.c
|
|
818 # $(CCV) $(TEMACS_CPP_FLAGS) $(SRC)\$(@B).c -Fo$@ $(BROWSERFLAGS)
|
442
|
819
|
1330
|
820 $(OUTDIR)\emacs.obj: $(SRCROOT)\version.sh
|
872
|
821
|
1330
|
822 $(OUTDIR)\libinterface.obj: $(SRC)\libinterface.c
|
|
823 $(CCV) $(TEMACS_CPP_CDECL_FLAGS) $(SRC)\$(@B).c -Fo$@ $(BROWSERFLAGS)
|
428
|
824
|
1330
|
825 ###################### Generated source files
|
|
826
|
|
827 $(OUTDIR)\nul:
|
|
828 -@mkdir $(OUTDIR)
|
872
|
829
|
1330
|
830 XEMACS_INCLUDES=\
|
|
831 $(SRC)\config.h \
|
|
832 $(SRC)\Emacs.ad.h \
|
|
833 $(SRC)\paths.h
|
428
|
834
|
1330
|
835 # #### Copying is cheap, we should just force these
|
|
836 $(SRC)\config.h: $(SRC)\config.h.in
|
|
837 # #### ms must have hired monkeys to design their shell commands. if
|
|
838 # #### you use xcopy to copy a file from one name to another, it
|
|
839 # #### PROMPTS you to see if you meant the second as a directory! and
|
|
840 # #### no switch to mean "no of course, you idiots, it's a file!"
|
2106
|
841 set COPYCMD=$(COPYCMD)
|
1330
|
842 @copy $(SRC)\config.h.in $(SRC)\config.h
|
428
|
843
|
1330
|
844 #$(SRC)\Emacs.ad.h: $(SRCROOT)\etc\Emacs.ad
|
|
845 # !"sed -f ad2c.sed < $(SRCROOT)\etc\Emacs.ad > $(SRC)\Emacs.ad.h"
|
872
|
846
|
1330
|
847 #$(SRC)\paths.h: $(SRC)\paths.h.in
|
|
848 # !"cd $(SRC); cp paths.h.in paths.h"
|
|
849
|
|
850 $(SRC)\Emacs.ad.h: $(NT)\Emacs.ad.h
|
2106
|
851 set COPYCMD=$(COPYCMD)
|
1330
|
852 @$(COPY) $(NT)\Emacs.ad.h $(SRC)
|
872
|
853
|
1330
|
854 $(SRC)\paths.h: $(NT)\paths.h
|
2106
|
855 set COPYCMD=$(COPYCMD)
|
1330
|
856 @$(COPY) $(NT)\paths.h $(SRC)
|
872
|
857
|
1330
|
858
|
|
859 ###################### lastfile.lib
|
872
|
860
|
1330
|
861 !if !$(USE_SYSTEM_MALLOC) || !$(USE_PORTABLE_DUMPER)
|
872
|
862
|
1330
|
863 LASTFILE=$(OUTDIR)\lastfile.lib
|
|
864 LASTFILE_SRC=$(SRC)
|
|
865 LASTFILE_FLAGS=$(CFLAGS) $(CPLUSPLUS_COMPILE_FLAGS) $(INCLUDES) -Fo$@ -Fd$* -c
|
|
866 LASTFILE_OBJS= \
|
|
867 $(OUTDIR)\lastfile.obj
|
872
|
868
|
1330
|
869 $(LASTFILE): $(XEMACS_INCLUDES) $(LASTFILE_OBJS)
|
|
870 link.exe -lib -nologo -out:$@ $(LASTFILE_OBJS)
|
|
871
|
|
872 $(OUTDIR)\lastfile.obj: $(LASTFILE_SRC)\lastfile.c
|
|
873 $(CCV) $(LASTFILE_FLAGS) $(LASTFILE_SRC)\$(@B).c
|
|
874
|
872
|
875 !endif
|
|
876
|
1330
|
877 ###################### lib-src programs
|
|
878
|
|
879 LIB_SRC_DEFINES = -DHAVE_CONFIG_H -DWIN32_NATIVE
|
|
880
|
|
881 #
|
|
882 # Creating config.values to be used by config.el
|
|
883 #
|
|
884 CONFIG_VALUES = $(BLDLIB_SRC)\config.values
|
|
885 !if [echo Creating $(CONFIG_VALUES) && echo ;;; Do not edit this file!>$(CONFIG_VALUES)]
|
|
886 !endif
|
|
887 !if [echo blddir>>$(CONFIG_VALUES) && echo "$(BLDROOT:\=\\)">>$(CONFIG_VALUES)]
|
|
888 !endif
|
|
889 !if [echo srcdir>>$(CONFIG_VALUES) && echo "$(SRCROOT:\=\\)">>$(CONFIG_VALUES)]
|
|
890 !endif
|
|
891 !if [echo CC>>$(CONFIG_VALUES) && echo "$(CC:\=\\)">>$(CONFIG_VALUES)]
|
|
892 !endif
|
|
893 !if [echo CFLAGS>>$(CONFIG_VALUES) && echo "$(CFLAGS:\=\\)">>$(CONFIG_VALUES)]
|
|
894 !endif
|
|
895 !if [echo CPP>>$(CONFIG_VALUES) && echo "$(CPP:\=\\)">>$(CONFIG_VALUES)]
|
|
896 !endif
|
|
897 !if [echo CPPFLAGS>>$(CONFIG_VALUES) && echo "$(CPPFLAGS:\=\\)">>$(CONFIG_VALUES)]
|
|
898 !endif
|
|
899 !if [echo LISPDIR>>$(CONFIG_VALUES) && echo "\\$(LISP:\=\\)">>$(CONFIG_VALUES)]
|
|
900 !endif
|
|
901 # PATH_PACKAGEPATH is already a quoted string.
|
|
902 !if [echo PACKAGE_PATH>>$(CONFIG_VALUES) && echo $(PATH_PACKAGEPATH)>>$(CONFIG_VALUES)]
|
|
903 !endif
|
|
904
|
|
905 LINK_DEPENDENCY_ARGS = -Fe$@ -Fd$* $** -link $(DEBUG_FLAGS_LINK)
|
|
906 LINK_STANDARD_LIBRARY_ARGS = setargv.obj user32.lib wsock32.lib
|
|
907
|
1333
|
908 LIB_SRC_CFLAGS = $(CFLAGS) -I$(LIB_SRC) -I$(SRC) $(LIB_SRC_DEFINES)
|
|
909
|
1330
|
910 # Inferred rule
|
|
911 {$(LIB_SRC)}.c{$(BLDLIB_SRC)}.exe :
|
1333
|
912 $(CCV) $(LIB_SRC_CFLAGS) $(LINK_DEPENDENCY_ARGS) $(LINK_STANDARD_LIBRARY_ARGS)
|
1330
|
913
|
|
914 # Individual dependencies
|
|
915 ETAGS_DEPS = $(LIB_SRC)/getopt.c $(LIB_SRC)/getopt1.c $(SRC)/regex.c
|
|
916 $(BLDLIB_SRC)/etags.exe : $(LIB_SRC)/etags.c $(ETAGS_DEPS)
|
1333
|
917 $(CCV) $(LIB_SRC_CFLAGS) $(LINK_DEPENDENCY_ARGS) -stack:0x800000 $(LINK_STANDARD_LIBRARY_ARGS)
|
1330
|
918
|
|
919 $(BLDLIB_SRC)/movemail.exe : $(LIB_SRC)/movemail.c $(LIB_SRC)/pop.c $(ETAGS_DEPS)
|
|
920
|
|
921 # Minitar uses zlib so just use cdecl to simplify things
|
|
922 $(BLDLIB_SRC)/minitar.exe : $(NT)/minitar.c
|
2500
|
923 $(CCV) -I"$(ZLIB_DIR)" $(LIB_SRC_DEFINES) $(CFLAGS_CDECL_NO_LIB) -MD $(LINK_DEPENDENCY_ARGS) "$(ZLIB_DIR)\zlib.lib"
|
1330
|
924
|
|
925 LIB_SRC_TOOLS = \
|
|
926 $(BLDLIB_SRC)/etags.exe \
|
|
927 $(BLDLIB_SRC)/hexl.exe \
|
|
928 $(BLDLIB_SRC)/i.exe \
|
|
929 $(BLDLIB_SRC)/winclient.exe \
|
|
930 $(BLDLIB_SRC)/make-docfile.exe \
|
|
931 $(BLDLIB_SRC)/mmencode.exe \
|
|
932 $(BLDLIB_SRC)/movemail.exe \
|
|
933 $(BLDLIB_SRC)/sorted-doc.exe \
|
|
934 $(BLDLIB_SRC)/wakeup.exe
|
|
935 !if $(USE_MINITAR)
|
|
936 LIB_SRC_TOOLS = \
|
|
937 $(LIB_SRC_TOOLS) \
|
|
938 $(BLDLIB_SRC)/minitar.exe
|
428
|
939 !endif
|
440
|
940 !if $(USE_PORTABLE_DUMPER)
|
1330
|
941 LIB_SRC_TOOLS = \
|
|
942 $(XEMACS_INCLUDES) \
|
|
943 $(BLDLIB_SRC)/make-dump-id.exe \
|
|
944 $(LIB_SRC_TOOLS)
|
442
|
945 !endif
|
428
|
946
|
1330
|
947 ###################### Building the info files
|
430
|
948
|
|
949 !if !defined(MAKEINFO)
|
776
|
950 MAKEINFO=$(XEMACS_BATCH_PACKAGES) -l texinfmt -f batch-texinfo-format
|
430
|
951 !endif
|
428
|
952
|
1330
|
953 MANDIR = $(SRCROOT)\man
|
|
954 INFODIR = $(SRCROOT)\info
|
428
|
955 INFO_FILES= \
|
|
956 $(INFODIR)\cl.info \
|
|
957 $(INFODIR)\custom.info \
|
|
958 $(INFODIR)\emodules.info \
|
|
959 $(INFODIR)\external-widget.info \
|
|
960 $(INFODIR)\info.info \
|
|
961 $(INFODIR)\standards.info \
|
|
962 $(INFODIR)\term.info \
|
|
963 $(INFODIR)\termcap.info \
|
|
964 $(INFODIR)\texinfo.info \
|
|
965 $(INFODIR)\widget.info \
|
|
966 $(INFODIR)\xemacs-faq.info \
|
|
967 $(INFODIR)\xemacs.info \
|
|
968 $(INFODIR)\lispref.info \
|
|
969 $(INFODIR)\new-users-guide.info \
|
|
970 $(INFODIR)\internals.info
|
|
971
|
|
972 {$(MANDIR)}.texi{$(INFODIR)}.info:
|
430
|
973 cd $(MANDIR)
|
2524
|
974 $(MAKEINFO) $(**F)
|
428
|
975
|
430
|
976 XEMACS_SRCS = \
|
428
|
977 $(MANDIR)\xemacs\abbrevs.texi \
|
|
978 $(MANDIR)\xemacs\basic.texi \
|
|
979 $(MANDIR)\xemacs\buffers.texi \
|
|
980 $(MANDIR)\xemacs\building.texi \
|
|
981 $(MANDIR)\xemacs\calendar.texi \
|
|
982 $(MANDIR)\xemacs\cmdargs.texi \
|
|
983 $(MANDIR)\xemacs\custom.texi \
|
|
984 $(MANDIR)\xemacs\display.texi \
|
|
985 $(MANDIR)\xemacs\entering.texi \
|
|
986 $(MANDIR)\xemacs\files.texi \
|
|
987 $(MANDIR)\xemacs\fixit.texi \
|
430
|
988 $(MANDIR)\xemacs\frame.texi \
|
428
|
989 $(MANDIR)\xemacs\glossary.texi \
|
|
990 $(MANDIR)\xemacs\gnu.texi \
|
|
991 $(MANDIR)\xemacs\help.texi \
|
|
992 $(MANDIR)\xemacs\indent.texi \
|
|
993 $(MANDIR)\xemacs\keystrokes.texi \
|
|
994 $(MANDIR)\xemacs\killing.texi \
|
|
995 $(MANDIR)\xemacs\m-x.texi \
|
|
996 $(MANDIR)\xemacs\major.texi \
|
|
997 $(MANDIR)\xemacs\mark.texi \
|
|
998 $(MANDIR)\xemacs\menus.texi \
|
|
999 $(MANDIR)\xemacs\mini.texi \
|
|
1000 $(MANDIR)\xemacs\misc.texi \
|
|
1001 $(MANDIR)\xemacs\mouse.texi \
|
430
|
1002 $(MANDIR)\xemacs\mule.texi \
|
428
|
1003 $(MANDIR)\xemacs\new.texi \
|
430
|
1004 $(MANDIR)\xemacs\packages.texi \
|
428
|
1005 $(MANDIR)\xemacs\picture.texi \
|
|
1006 $(MANDIR)\xemacs\programs.texi \
|
|
1007 $(MANDIR)\xemacs\reading.texi \
|
|
1008 $(MANDIR)\xemacs\regs.texi \
|
|
1009 $(MANDIR)\xemacs\search.texi \
|
|
1010 $(MANDIR)\xemacs\sending.texi \
|
430
|
1011 $(MANDIR)\xemacs\startup.texi \
|
428
|
1012 $(MANDIR)\xemacs\text.texi \
|
|
1013 $(MANDIR)\xemacs\trouble.texi \
|
|
1014 $(MANDIR)\xemacs\undo.texi \
|
430
|
1015 $(MANDIR)\xemacs\windows.texi \
|
|
1016 $(MANDIR)\xemacs\xemacs.texi
|
428
|
1017
|
430
|
1018 LISPREF_SRCS = \
|
428
|
1019 $(MANDIR)\lispref\abbrevs.texi \
|
|
1020 $(MANDIR)\lispref\annotations.texi \
|
|
1021 $(MANDIR)\lispref\back.texi \
|
|
1022 $(MANDIR)\lispref\backups.texi \
|
|
1023 $(MANDIR)\lispref\buffers.texi \
|
|
1024 $(MANDIR)\lispref\building.texi \
|
|
1025 $(MANDIR)\lispref\commands.texi \
|
|
1026 $(MANDIR)\lispref\compile.texi \
|
|
1027 $(MANDIR)\lispref\consoles-devices.texi \
|
|
1028 $(MANDIR)\lispref\control.texi \
|
430
|
1029 $(MANDIR)\lispref\customize.texi \
|
428
|
1030 $(MANDIR)\lispref\databases.texi \
|
|
1031 $(MANDIR)\lispref\debugging.texi \
|
|
1032 $(MANDIR)\lispref\dialog.texi \
|
|
1033 $(MANDIR)\lispref\display.texi \
|
430
|
1034 $(MANDIR)\lispref\dragndrop.texi \
|
428
|
1035 $(MANDIR)\lispref\edebug-inc.texi \
|
|
1036 $(MANDIR)\lispref\edebug.texi \
|
|
1037 $(MANDIR)\lispref\errors.texi \
|
|
1038 $(MANDIR)\lispref\eval.texi \
|
|
1039 $(MANDIR)\lispref\extents.texi \
|
|
1040 $(MANDIR)\lispref\faces.texi \
|
|
1041 $(MANDIR)\lispref\files.texi \
|
|
1042 $(MANDIR)\lispref\frames.texi \
|
|
1043 $(MANDIR)\lispref\functions.texi \
|
|
1044 $(MANDIR)\lispref\glyphs.texi \
|
|
1045 $(MANDIR)\lispref\hash-tables.texi \
|
|
1046 $(MANDIR)\lispref\help.texi \
|
|
1047 $(MANDIR)\lispref\hooks.texi \
|
430
|
1048 $(MANDIR)\lispref\index.texi \
|
428
|
1049 $(MANDIR)\lispref\internationalization.texi \
|
|
1050 $(MANDIR)\lispref\intro.texi \
|
|
1051 $(MANDIR)\lispref\keymaps.texi \
|
|
1052 $(MANDIR)\lispref\ldap.texi \
|
430
|
1053 $(MANDIR)\lispref\lispref.texi \
|
428
|
1054 $(MANDIR)\lispref\lists.texi \
|
|
1055 $(MANDIR)\lispref\loading.texi \
|
|
1056 $(MANDIR)\lispref\locals.texi \
|
|
1057 $(MANDIR)\lispref\macros.texi \
|
|
1058 $(MANDIR)\lispref\maps.texi \
|
|
1059 $(MANDIR)\lispref\markers.texi \
|
|
1060 $(MANDIR)\lispref\menus.texi \
|
|
1061 $(MANDIR)\lispref\minibuf.texi \
|
|
1062 $(MANDIR)\lispref\modes.texi \
|
|
1063 $(MANDIR)\lispref\mouse.texi \
|
|
1064 $(MANDIR)\lispref\mule.texi \
|
|
1065 $(MANDIR)\lispref\numbers.texi \
|
|
1066 $(MANDIR)\lispref\objects.texi \
|
|
1067 $(MANDIR)\lispref\os.texi \
|
|
1068 $(MANDIR)\lispref\positions.texi \
|
|
1069 $(MANDIR)\lispref\processes.texi \
|
|
1070 $(MANDIR)\lispref\range-tables.texi \
|
|
1071 $(MANDIR)\lispref\scrollbars.texi \
|
|
1072 $(MANDIR)\lispref\searching.texi \
|
|
1073 $(MANDIR)\lispref\sequences.texi \
|
|
1074 $(MANDIR)\lispref\specifiers.texi \
|
|
1075 $(MANDIR)\lispref\streams.texi \
|
|
1076 $(MANDIR)\lispref\strings.texi \
|
|
1077 $(MANDIR)\lispref\symbols.texi \
|
|
1078 $(MANDIR)\lispref\syntax.texi \
|
|
1079 $(MANDIR)\lispref\text.texi \
|
|
1080 $(MANDIR)\lispref\tips.texi \
|
|
1081 $(MANDIR)\lispref\toolbar.texi \
|
|
1082 $(MANDIR)\lispref\tooltalk.texi \
|
|
1083 $(MANDIR)\lispref\variables.texi \
|
|
1084 $(MANDIR)\lispref\windows.texi \
|
430
|
1085 $(MANDIR)\lispref\x-windows.texi
|
|
1086
|
|
1087 INTERNALS_SRCS = \
|
2373
|
1088 $(MANDIR)\internals\internals.texi
|
430
|
1089
|
|
1090 NEW_USERS_GUIDE_SRCS = \
|
|
1091 $(MANDIR)\new-users-guide\custom1.texi \
|
|
1092 $(MANDIR)\new-users-guide\custom2.texi \
|
|
1093 $(MANDIR)\new-users-guide\edit.texi \
|
|
1094 $(MANDIR)\new-users-guide\enter.texi \
|
|
1095 $(MANDIR)\new-users-guide\files.texi \
|
|
1096 $(MANDIR)\new-users-guide\help.texi \
|
|
1097 $(MANDIR)\new-users-guide\modes.texi \
|
|
1098 $(MANDIR)\new-users-guide\new-users-guide.texi \
|
|
1099 $(MANDIR)\new-users-guide\region.texi \
|
|
1100 $(MANDIR)\new-users-guide\search.texi \
|
|
1101 $(MANDIR)\new-users-guide\xmenu.texi
|
|
1102
|
|
1103 $(INFODIR)\xemacs.info: $(XEMACS_SRCS)
|
|
1104 cd $(MANDIR)\xemacs
|
|
1105 $(MAKEINFO) xemacs.texi
|
428
|
1106
|
|
1107
|
430
|
1108 $(INFODIR)\lispref.info: $(LISPREF_SRCS)
|
|
1109 cd $(MANDIR)\lispref
|
|
1110 $(MAKEINFO) lispref.texi
|
|
1111
|
|
1112 $(INFODIR)\internals.info: $(INTERNALS_SRCS)
|
|
1113 cd $(MANDIR)\internals
|
|
1114 $(MAKEINFO) internals.texi
|
|
1115
|
|
1116 $(INFODIR)\new-users-guide.info: $(NEW_USERS_GUIDE_SRCS)
|
|
1117 cd $(MANDIR)\new-users-guide
|
|
1118 $(MAKEINFO) new-users-guide.texi
|
428
|
1119
|
815
|
1120 info: makeinfo-test $(INFO_FILES)
|
428
|
1121
|
1330
|
1122 ########################### Create the Installation file
|
428
|
1123
|
1330
|
1124 $(BLDROOT)\Installation:: installation
|
440
|
1125
|
442
|
1126 installation::
|
1330
|
1127 @echo OS version:>$(BLDROOT)\Installation
|
|
1128 @ver >> $(BLDROOT)\Installation
|
|
1129 @type >> $(BLDROOT)\Installation <<
|
428
|
1130 !if defined(OS)
|
|
1131 OS: $(OS)
|
|
1132 !endif
|
|
1133
|
1370
|
1134 XEmacs $(XEMACS_VERSION_STRING) $(xemacs_codename) $(xemacs_extra_name:"=) configured for `$(EMACS_CONFIGURATION)'.
|
428
|
1135
|
1052
|
1136 Building XEmacs using "$(MAKE:\=\\)".
|
|
1137 Building XEmacs using make flags "$(MAKEFLAGS)".
|
1330
|
1138 Building XEmacs in source tree "$(SRCROOT:\=\\)".
|
|
1139 !if $(SEPARATE_BUILD)
|
|
1140 Building XEmacs into compiled tree "$(BLDROOT:\=\\)".
|
|
1141 !endif
|
428
|
1142 !if defined(CCV)
|
1333
|
1143 For src, using compiler "$(CC) $(TEMACS_CPP_FLAGS)".
|
|
1144 For lib-src, using compiler "$(CC) $(LIB_SRC_CFLAGS)".
|
428
|
1145 !endif
|
1203
|
1146 !if $(CPLUSPLUS_COMPILE)
|
|
1147 Compiling as C++.
|
|
1148 !endif
|
1052
|
1149 Installing XEmacs in "$(INSTALL_DIR:\=\\)".
|
|
1150 Package path is $(PATH_PACKAGEPATH).
|
428
|
1151 !if $(INFODOCK)
|
|
1152 Building InfoDock.
|
|
1153 !endif
|
442
|
1154 !if $(HAVE_MS_WINDOWS)
|
428
|
1155 Compiling in support for Microsoft Windows native GUI.
|
|
1156 !endif
|
771
|
1157 !if $(MULE)
|
|
1158 Compiling in international (MULE) support.
|
428
|
1159 !endif
|
488
|
1160 !if $(HAVE_GTK)
|
|
1161 --------------------------------------------------------------------
|
1315
|
1162 NOTE: You specified HAVE_GTK=1, but we are compiling WITHOUT GTK support.
|
|
1163 NOTE: gtk-xemacs is not currently supported on MS Windows (mingw or msvc).
|
|
1164 NOTE: Yes, we know that gtk has been ported to native MS Windows, but
|
|
1165 NOTE: XEmacs is not yet ready to use that port.
|
488
|
1166 --------------------------------------------------------------------
|
|
1167 !endif
|
428
|
1168 !if $(HAVE_XPM)
|
|
1169 Compiling in support for XPM images.
|
|
1170 !else
|
|
1171 --------------------------------------------------------------------
|
1315
|
1172 NOTE: Compiling without XPM support.
|
|
1173 NOTE: You should strongly consider installing XPM.
|
|
1174 NOTE: Otherwise toolbars and other graphics will look suboptimal.
|
|
1175 NOTE: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)
|
428
|
1176 --------------------------------------------------------------------
|
|
1177 !endif
|
|
1178 !if $(HAVE_GIF)
|
|
1179 Compiling in support for GIF images.
|
|
1180 !endif
|
|
1181 !if $(HAVE_PNG)
|
|
1182 Compiling in support for PNG images.
|
|
1183 !else
|
|
1184 --------------------------------------------------------------------
|
1315
|
1185 NOTE: Compiling without PNG image support.
|
|
1186 NOTE: You should strongly consider installing the PNG libraries.
|
|
1187 NOTE: Otherwise certain images and glyphs may not display.
|
|
1188 NOTE: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux
|
428
|
1189 --------------------------------------------------------------------
|
|
1190 !endif
|
|
1191 !if $(HAVE_TIFF)
|
|
1192 Compiling in support for TIFF images.
|
|
1193 !endif
|
|
1194 !if $(HAVE_JPEG)
|
|
1195 Compiling in support for JPEG images.
|
|
1196 !endif
|
|
1197 !if $(HAVE_XFACE)
|
|
1198 Compiling in support for X-Face message headers.
|
|
1199 !endif
|
771
|
1200 !if $(HAVE_ZLIB)
|
|
1201 Compiling in support for GZIP compression/decompression.
|
|
1202 !endif
|
428
|
1203 !if $(HAVE_TOOLBARS)
|
|
1204 Compiling in support for toolbars.
|
|
1205 !endif
|
|
1206 !if $(HAVE_DIALOGS)
|
|
1207 Compiling in support for dialogs.
|
|
1208 !endif
|
|
1209 !if $(HAVE_WIDGETS)
|
|
1210 Compiling in support for widgets.
|
|
1211 !endif
|
|
1212 !if $(HAVE_NATIVE_SOUND)
|
|
1213 Compiling in support for native sounds.
|
|
1214 !endif
|
|
1215 !if $(USE_UNION_TYPE)
|
|
1216 Using union type for Lisp object storage.
|
1315
|
1217 NOTE: ---------------------------------------------------------
|
|
1218 NOTE: This tends to trigger compiler bugs, especially when combined
|
|
1219 NOTE: with MULE and ERROR_CHECKING. Crashes in pdump have recently
|
|
1220 NOTE: been observed using Visual C++ in combination with union type,
|
|
1221 NOTE: MULE, and ERROR_CHECKING.
|
|
1222 NOTE: ---------------------------------------------------------
|
428
|
1223 !endif
|
438
|
1224 !if $(USE_PORTABLE_DUMPER)
|
|
1225 Using portable dumper.
|
|
1226 !endif
|
440
|
1227 !if $(USE_SYSTEM_MALLOC)
|
|
1228 Using system malloc.
|
|
1229 !endif
|
|
1230 !if $(USE_CRTDLL)
|
942
|
1231 Using DLL version of C runtime library.
|
440
|
1232 !endif
|
814
|
1233 !if $(ERROR_CHECK_ALL)
|
1203
|
1234 Compiling in extra internal error-checking.
|
1315
|
1235 NOTE: ---------------------------------------------------------
|
|
1236 NOTE: Compiling in support for runtime error-checking.
|
|
1237 NOTE: XEmacs will run noticeably more slowly as a result.
|
|
1238 NOTE: Error-checking is on by default for XEmacs beta releases.
|
|
1239 NOTE: ---------------------------------------------------------
|
814
|
1240 !endif
|
428
|
1241 !if $(DEBUG_XEMACS)
|
814
|
1242 Compiling in debugging support (no slowdown).
|
|
1243 !endif
|
|
1244 !if $(OPTIMIZED_BUILD)
|
|
1245 Compiling with optimization.
|
428
|
1246 !endif
|
442
|
1247 !if $(QUICK_BUILD)
|
|
1248 Disabling non-essential build actions. Use with care!
|
|
1249 !endif
|
942
|
1250 !if $(USE_KKCC)
|
|
1251 Using new experimental GC algorithms.
|
|
1252 !endif
|
2720
|
1253 !if $(MC_ALLOC)
|
|
1254 Using new experimental allocator.
|
|
1255 !endif
|
428
|
1256 <<NOKEEP
|
|
1257 @echo --------------------------------------------------------------------
|
1330
|
1258 @type $(BLDROOT)\Installation
|
428
|
1259 @echo --------------------------------------------------------------------
|
|
1260
|
1330
|
1261 #########################################################################
|
|
1262 ## Primary rebuilding process ##
|
|
1263 #########################################################################
|
|
1264
|
|
1265 ########################### Definitions for linking temacs.exe
|
|
1266
|
|
1267 !if !$(USE_PORTABLE_DUMPER)
|
|
1268 TEMACS_ENTRYPOINT=-entry:_start
|
|
1269 !else
|
|
1270 TEMACS_ENTRYPOINT=-entry:mainCRTStartup
|
|
1271 !endif
|
|
1272
|
|
1273 TEMACS_BROWSE=$(BLDSRC)\temacs.bsc
|
|
1274 TEMACS_LIBS=$(LASTFILE) $(MSW_LIBS) \
|
|
1275 oldnames.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib advapi32.lib \
|
|
1276 shell32.lib wsock32.lib netapi32.lib winmm.lib winspool.lib ole32.lib \
|
|
1277 mpr.lib uuid.lib imm32.lib $(LIBC_LIB)
|
2524
|
1278 TEMACS_COMMON_LFLAGS=-nologo $(LIBRARIES) $(DEBUG_FLAGS_LINK) \
|
1333
|
1279 -base:0x1000000 -stack:0x800000 $(TEMACS_ENTRYPOINT) -subsystem:windows \
|
1330
|
1280 -heap:0x00100000 -nodefaultlib $(PROFILE_FLAGS) setargv.obj
|
2524
|
1281 TEMACS_LFLAGS=$(TEMACS_COMMON_LFLAGS) \
|
|
1282 -pdb:$(BLDSRC)\temacs.pdb -map:$(BLDSRC)\temacs.map
|
|
1283 XEMACS_LFLAGS=$(TEMACS_COMMON_LFLAGS) \
|
|
1284 -pdb:$(BLDSRC)\xemacs.pdb -map:$(BLDSRC)\xemacs.map
|
1330
|
1285
|
|
1286 ########################### Definitions for running temacs.exe/xemacs.exe
|
|
1287
|
|
1288 RAW_EXE=$(BLDSRC)\temacs.exe
|
|
1289 DUMP_TARGET = $(BLDSRC)\xemacs.exe
|
|
1290 DO_TEMACS = "$(BLDLIB_SRC)\i" "$(RAW_EXE)"
|
|
1291 DO_XEMACS = "$(BLDLIB_SRC)\i" "$(DUMP_TARGET)"
|
|
1292
|
|
1293 BATCH = -no-packages -batch
|
|
1294 BATCH_PACKAGES = -vanilla -batch
|
|
1295 TEMACS_BATCH = $(DO_TEMACS) -nd $(BATCH)
|
|
1296 XEMACS_BATCH = $(DO_XEMACS) $(BATCH)
|
|
1297 XEMACS_BATCH_PACKAGES = $(DO_XEMACS) $(BATCH_PACKAGES)
|
|
1298 temacs_loadup_args = -l $(LISP)/loadup.el
|
|
1299 dump_temacs_args = $(temacs_loadup_args) dump
|
|
1300 run_temacs_args = $(temacs_loadup_args) run-temacs
|
|
1301 dump_temacs = $(TEMACS_BATCH) $(dump_temacs_args)
|
|
1302
|
|
1303 ########################### Build rules
|
|
1304
|
1346
|
1305 ## Use this rule to build the complete system. We need both update-elc
|
|
1306 ## and update-elc-2 due to the sideways dependency of NEEDTODUMP. See
|
|
1307 ## src/Makefile.in.in for a more detailed discussion of this.
|
|
1308
|
|
1309 all: installation $(OUTDIR)\nul $(LIB_SRC_TOOLS) \
|
|
1310 update-elc update-elc-2 \
|
|
1311 $(LISP)/finder-inf.el load-shadows info
|
1330
|
1312
|
|
1313 $(TEMACS_BROWSE): $(TEMACS_OBJS)
|
|
1314 @dir /b/s $(OUTDIR)\*.sbr > $(OUTDIR)\bscmake.tmp
|
|
1315 bscmake -nologo -o$(TEMACS_BROWSE) @$(OUTDIR)\bscmake.tmp
|
|
1316 -$(DEL) $(OUTDIR)\bscmake.tmp
|
|
1317
|
1346
|
1318 ## (1) Compile all dependencies of the XEmacs executable
|
1330
|
1319
|
|
1320 $(OUTDIR)\dump-id.obj : $(BLDSRC)\dump-id.c
|
|
1321 $(CCV) $(TEMACS_CPP_FLAGS) $(BLDSRC)\$(@B).c -Fo$@ $(BROWSERFLAGS)
|
|
1322
|
|
1323 $(BLDSRC)\dump-id.c : $(BLDLIB_SRC)/make-dump-id.exe $(TEMACS_OBJS)
|
|
1324 cd $(BLDSRC)
|
|
1325 $(BLDLIB_SRC)\make-dump-id.exe
|
|
1326
|
|
1327 $(OUTDIR)\temacs.res: $(NT)\xemacs.rc
|
|
1328 cd $(NT)
|
|
1329 rc -Fo$@ xemacs.rc
|
|
1330
|
1346
|
1331 ## (2) Link the XEmacs executable
|
|
1332
|
1330
|
1333 !if $(USE_PORTABLE_DUMPER)
|
|
1334 TEMACS_DUMP_DEP = $(OUTDIR)\dump-id.obj
|
|
1335 !else
|
|
1336 TEMACS_DUMP_DEP = $(OUTDIR)\temacs.res
|
|
1337 !endif
|
|
1338
|
|
1339 $(RAW_EXE): $(TEMACS_OBJS) $(LASTFILE) $(TEMACS_DUMP_DEP)
|
|
1340 link.exe @<<
|
|
1341 $(TEMACS_LFLAGS) -out:$@ $(TEMACS_OBJS) $(TEMACS_DUMP_DEP) $(TEMACS_LIBS)
|
|
1342 <<
|
|
1343
|
|
1344 !if $(DEBUG_XEMACS)
|
|
1345 $(RAW_EXE): $(TEMACS_BROWSE)
|
|
1346 !endif
|
|
1347
|
1346
|
1348 ## (3) Update the .elc's needed for dumping
|
|
1349
|
|
1350 update-elc: $(RAW_EXE)
|
|
1351 $(TEMACS_BATCH) -l $(LISP)\update-elc.el
|
|
1352
|
|
1353 ## This file is touched by update-elc.el when redumping is necessary.
|
|
1354 $(BLDSRC)\NEEDTODUMP:
|
|
1355 @echo >$(BLDSRC)\NEEDTODUMP
|
|
1356
|
|
1357 ## (4) Build the DOC file
|
1330
|
1358
|
|
1359 DOC=$(BLDLIB_SRC)\DOC
|
|
1360
|
|
1361 docfile ::
|
|
1362 if exist $(DOC) $(DEL) $(DOC)
|
|
1363 docfile :: $(DOC)
|
|
1364
|
|
1365 # We need to write the QUICK_BUILD stuff as-is (and not just have no
|
|
1366 # dependencies for DOC) because DOC needs TEMACS_OBJS as dependencies to
|
|
1367 # get $(**) right. The `touch' is needed because of the way nmake
|
|
1368 # calculates dependencies; see comments in src/Makefile.in.in.
|
|
1369 $(DOC): $(BLDLIB_SRC)\make-docfile.exe $(BLDSRC)\NEEDTODUMP $(TEMACS_OBJS)
|
|
1370 !if $(QUICK_BUILD)
|
|
1371 if not exist $(DOC) $(TEMACS_BATCH) -l $(LISP)\make-docfile.el -- -o $(DOC) -i $(SRCROOT)\site-packages @<<
|
|
1372 $(**)
|
|
1373 <<
|
|
1374 -touch $(DOC)
|
|
1375 !else
|
|
1376 $(TEMACS_BATCH) -l $(LISP)\make-docfile.el -- -o $(DOC) -i $(SRCROOT)\site-packages @<<
|
|
1377 $(**)
|
|
1378 <<
|
|
1379 !endif
|
|
1380
|
1346
|
1381 ## (5) Dump
|
1330
|
1382
|
|
1383 !if $(USE_PORTABLE_DUMPER)
|
|
1384 $(DUMP_TARGET): $(NT)\xemacs.rc
|
|
1385 !endif
|
|
1386
|
|
1387 # This rule dumps xemacs and then possibly spawns sub-make if PURESPACE
|
|
1388 # requirements have changed.
|
|
1389
|
|
1390 $(DUMP_TARGET): $(DOC) $(RAW_EXE) $(BLDSRC)\NEEDTODUMP
|
|
1391 $(TEMACS_BATCH) -l $(LISP)\loadup.el dump
|
|
1392 !if $(USE_PORTABLE_DUMPER)
|
|
1393 cd $(BLDSRC)
|
|
1394 rc -d INCLUDE_DUMP -Fo $(OUTDIR)\xemacs.res $(NT)\xemacs.rc
|
|
1395 # Make the resource section read/write since almost all of it is the dump
|
|
1396 # data which needs to be writable. This avoids having to copy it.
|
|
1397 link.exe @<<
|
2524
|
1398 $(XEMACS_LFLAGS) -section:.rsrc,rw -out:$(BLDSRC)\xemacs.exe $(TEMACS_OBJS) $(OUTDIR)\xemacs.res $(TEMACS_LIBS) $(OUTDIR)\dump-id.obj
|
1330
|
1399 <<
|
|
1400 -$(DEL) $(BLDSRC)\xemacs.dmp
|
|
1401 !endif
|
|
1402
|
1346
|
1403 ## (6) Update the remaining .elc's, post-dumping
|
|
1404
|
|
1405 update-elc-2: $(DUMP_TARGET)
|
1330
|
1406 $(XEMACS_BATCH) -no-autoloads -l update-elc-2.el -f batch-update-elc-2 $(LISP)
|
|
1407
|
1346
|
1408 ## (7) Other random stuff
|
|
1409
|
|
1410 $(LISP)/finder-inf.el: update-elc-2
|
1330
|
1411 !if !$(QUICK_BUILD)
|
|
1412 @echo Building finder database ...
|
|
1413 $(XEMACS_BATCH) -eval "(setq finder-compile-keywords-quiet t)" \
|
|
1414 -l finder -f finder-compile-keywords
|
|
1415 @echo Building finder database ...(done)
|
|
1416 !endif
|
|
1417
|
1346
|
1418 load-shadows: update-elc-2
|
1330
|
1419 !if !$(QUICK_BUILD)
|
|
1420 @echo Testing for Lisp shadows ...
|
|
1421 @$(XEMACS_BATCH) -f list-load-path-shadows
|
|
1422 !endif
|
|
1423
|
|
1424 #########################################################################
|
|
1425 ## Other random crap ##
|
|
1426 #########################################################################
|
|
1427
|
|
1428 ########################### Automated tests
|
428
|
1429
|
1330
|
1430 testdir = ../tests/automated
|
|
1431 batch_test_emacs = $(BATCH_PACKAGES) -l $(testdir)/test-harness.el -f batch-test-emacs $(testdir)
|
|
1432
|
|
1433 check:
|
|
1434 cd $(BLDSRC)
|
|
1435 $(DO_XEMACS) $(batch_test_emacs)
|
|
1436
|
|
1437 check-temacs:
|
|
1438 cd $(BLDSRC)
|
1680
|
1439 $(TEMACS_BATCH) $(run_temacs_args) $(batch_test_emacs)
|
1330
|
1440
|
|
1441 check-features: all
|
|
1442 cd $(BLDSRC)
|
|
1443 $(XEMACS_BATCH) -l check-features.el
|
|
1444
|
|
1445
|
|
1446 ########################### Rebuilding TAGS
|
|
1447
|
|
1448 tags:
|
|
1449 @echo If you do not have a copy of etags around, then do 'make lib-src' first.
|
|
1450 @echo To make use of the tags file, put the following in your .emacs:
|
|
1451 @echo (setq tag-table-alist
|
|
1452 @echo '(("$(SRCROOT:\=\\)\\" . "$(SRCROOT:\=\\)\\")))
|
|
1453 cd $(SRCROOT)
|
|
1454 -$(DEL) TAGS
|
|
1455 set PATH=lib-src;%PATH%
|
|
1456 # we need to double ^, but only in one place, because (according to the
|
|
1457 # nmake manual), a ^ is used to quote certain special characters such as
|
|
1458 # backslash, but is treated literally within double quotes -- and notice
|
|
1459 # carefully the occurrences of double quotes in the first line below!
|
|
1460 etags -a -r "/[ ]*DEF\(VAR\|INE\)_[A-Z_]+[ ]*([ ]*\"\([^^\"]+\)\"/\2/" src\*.c src\*.h lwlib\*.c lwlib\*.h lib-src\*.c lib-src\*.h
|
|
1461 etags -a -l none -r "/^(def\(var\|un\|alias\|const\|macro\|subst\|struct\|face\|group\|custom\|ine-\(function\|compiler-macro\|[a-z-]+alias\)\)[ ]+'?\([^ ]+\)/\3/" $(LISP)\*.el $(LISP)\mule\*.el
|
|
1462
|
|
1463 ########################### Install the system
|
|
1464
|
|
1465 # use this rule to install the system
|
|
1466 install: all
|
|
1467 cd $(NT)
|
2106
|
1468 set COPYCMD=$(COPYCMD)
|
1330
|
1469 @echo Installing in $(INSTALL_DIR) ...
|
|
1470 @echo PlaceHolder > PlaceHolder
|
1393
|
1471 @$(COPY) $(SRCROOT)\PROBLEMS "$(INSTALL_DIR)\"
|
2537
|
1472 @$(COPY) $(SRCROOT)\README "$(INSTALL_DIR)\"
|
|
1473 @$(COPY) $(SRCROOT)\COPYING "$(INSTALL_DIR)\"
|
|
1474 @$(COPY) $(SRCROOT)\Installation "$(INSTALL_DIR)\"
|
1330
|
1475 @$(COPY) PlaceHolder "$(INSTALL_DIR)\lock\"
|
|
1476 -$(DEL) "$(INSTALL_DIR)\lock\PlaceHolder"
|
2537
|
1477 # @$(COPY) $(BLDLIB_SRC)\*.exe "$(INSTALL_DIR)\lib-src\"
|
|
1478 # @$(COPY) $(BLDLIB_SRC)\DOC "$(INSTALL_DIR)\lib-src\"
|
|
1479 # @$(COPY) $(CONFIG_VALUES) "$(INSTALL_DIR)\lib-src\"
|
|
1480 # @$(COPY) $(BLDSRC)\xemacs.exe "$(INSTALL_DIR)\bin\"
|
1330
|
1481 @$(COPY) $(BLDLIB_SRC)\*.exe "$(INSTALL_DIR)\$(EMACS_CONFIGURATION)\"
|
|
1482 @$(COPY) $(BLDLIB_SRC)\DOC "$(INSTALL_DIR)\$(EMACS_CONFIGURATION)"
|
|
1483 @$(COPY) $(CONFIG_VALUES) "$(INSTALL_DIR)\$(EMACS_CONFIGURATION)"
|
|
1484 @$(COPY) $(BLDSRC)\xemacs.exe "$(INSTALL_DIR)\$(EMACS_CONFIGURATION)"
|
1657
|
1485 # APA: This is not good enough! It copies all .#* CVS files
|
|
1486 # and the CVS directory too!
|
1330
|
1487 @$(COPYDIR) $(SRCROOT)\etc "$(INSTALL_DIR)\etc\"
|
|
1488 @$(COPYDIR) $(SRCROOT)\info "$(INSTALL_DIR)\info\"
|
|
1489 @$(COPYDIR) $(SRCROOT)\lisp "$(INSTALL_DIR)\lisp\"
|
|
1490 @echo Making skeleton package tree in $(PACKAGE_PREFIX) ...
|
|
1491 @$(COPY) PlaceHolder "$(PACKAGE_PREFIX)\site-packages\"
|
|
1492 -$(DEL) "$(PACKAGE_PREFIX)\site-packages\PlaceHolder"
|
|
1493 @$(COPY) PlaceHolder "$(PACKAGE_PREFIX)\mule-packages\"
|
|
1494 -$(DEL) "$(PACKAGE_PREFIX)\mule-packages\PlaceHolder"
|
|
1495 @$(COPY) PlaceHolder "$(PACKAGE_PREFIX)\xemacs-packages\"
|
|
1496 -$(DEL) "$(PACKAGE_PREFIX)\xemacs-packages\PlaceHolder"
|
|
1497 -$(DEL) PlaceHolder
|
|
1498
|
|
1499 ########################### clean
|
|
1500
|
|
1501 mostlyclean:
|
|
1502 -$(DEL) $(BLDROOT)\Installation
|
|
1503 -$(DEL) $(OUTDIR)\*.lib
|
|
1504 -$(DEL) $(OUTDIR)\*.obj
|
|
1505 -$(DEL) $(OUTDIR)\*.pdb
|
|
1506 -$(DEL) $(OUTDIR)\*.res
|
|
1507 -$(DEL) $(OUTDIR)\*.sbr
|
|
1508 -$(DEL) $(BLDSRC)\*.exe
|
|
1509 -$(DEL) $(BLDSRC)\*.dmp
|
|
1510 -$(DEL) $(BLDSRC)\*.map
|
|
1511 -$(DEL) $(BLDSRC)\*.pdb
|
|
1512 -$(DEL) $(BLDSRC)\NEEDTODUMP
|
|
1513 -$(DEL) $(BLDSRC)\dump-id.c
|
|
1514 -$(DEL) $(SRC)\*.bsc
|
|
1515 -$(DEL) $(BLDLIB_SRC)\*.exe
|
|
1516 -$(DEL) $(BLDLIB_SRC)\*.obj
|
|
1517 -$(DEL) $(BLDLIB_SRC)\*.pdb
|
|
1518 -$(DEL) $(BLDLIB_SRC)\*.res
|
|
1519
|
|
1520 versionclean:
|
|
1521 -$(DEL) $(BLDSRC)\xemacs.exe
|
|
1522 -$(DEL) $(BLDLIB_SRC)\DOC
|
|
1523
|
|
1524 clean: mostlyclean versionclean
|
|
1525 -$(DEL) $(SRCROOT)\TAGS
|
|
1526 -$(DEL) $(LISP)\auto-autoloads.el*
|
|
1527 -$(DEL) $(LISP)\mule\auto-autoloads.el*
|
|
1528 -$(DEL) $(LISP)\custom-load.el*
|
|
1529 -$(DEL) $(LISP)\mule\custom-load.el*
|
|
1530
|
|
1531 nicenclean: clean
|
|
1532 -$(DEL) $(NT)\*.bak
|
|
1533 -$(DEL) $(NT)\*.orig
|
|
1534 -$(DEL) $(NT)\*.rej
|
|
1535 -$(DEL) $(NT)\*.tmp
|
|
1536 -$(DEL) $(LIB_SRC)\*.bak
|
|
1537 -$(DEL) $(LIB_SRC)\*.orig
|
|
1538 -$(DEL) $(LIB_SRC)\*.rej
|
|
1539 -$(DEL) $(LIB_SRC)\*.tmp
|
|
1540 -$(DEL) $(SRC)\*.bak
|
|
1541 -$(DEL) $(SRC)\*.orig
|
|
1542 -$(DEL) $(SRC)\*.rej
|
|
1543 -$(DEL) $(SRC)\*.tmp
|
|
1544 -$(DEL) $(LISP)\*.bak
|
|
1545 -$(DEL) $(LISP)\*.orig
|
|
1546 -$(DEL) $(LISP)\*.rej
|
|
1547 -$(DEL) $(LISP)\*.tmp
|
|
1548
|
|
1549 # Convenience target.
|
|
1550 # Reproducing the configuration is just a matter of copying, and if
|
|
1551 # we use the same directory for Cygwin builds these must go. We don't
|
|
1552 # want to use distclean.
|
|
1553 configclean:
|
|
1554 -$(DEL) $(SRC)\config.h
|
|
1555 -$(DEL) $(SRC)\paths.h
|
|
1556 -$(DEL) $(SRC)\Emacs.ad.h
|
|
1557
|
|
1558 ## This is used in making a distribution.
|
|
1559 ## Do not use it on development directories!
|
|
1560 distclean: nicenclean configclean
|
|
1561 -$(DEL) $(BLDLIB_SRC)\$(CONFIG_VALUES)
|
|
1562 -$(DEL) $(INFODIR)\*.info*
|
|
1563 -$(DEL) $(LISP)\*.elc
|
|
1564 -$(DEL) $(LISP)\mule\*.elc
|
|
1565 -$(DEL) $(LISP)\term\*.elc
|
|
1566
|
|
1567 realclean: distclean
|
|
1568
|
|
1569 #not sure about those wildcards. DOS wildcards are stupid compared to Unix,
|
|
1570 #and could end up deleting *everything* instead of just backup files or
|
|
1571 #whatever. So just leave it at "realclean"
|
|
1572 extraclean: realclean
|
|
1573 # -$(DEL) *~
|
|
1574 # -$(DEL) *.*~
|
|
1575 # -$(DEL) #*
|
|
1576 # -$(DEL) m\*~
|
|
1577 # -$(DEL) m\#*
|
|
1578 # -$(DEL) s\*~
|
|
1579 # -$(DEL) s\#*
|
|
1580
|
|
1581 ########################### Rebuild source dependency file
|
|
1582
|
|
1583 depend:
|
|
1584 cd $(SRC)
|
|
1585 perl ./make-src-depend > depend.tmp
|
|
1586 perl -MFile::Compare -e "compare('depend.tmp', 'depend') && rename('depend.tmp', 'depend') or unlink('depend.tmp')"
|
|
1587
|
|
1588 ########################### Redo Unicode-Encapsulation
|
|
1589
|
|
1590 unicode-encapsulate:
|
|
1591 cd $(SRC)
|
|
1592 perl ../lib-src/make-mswin-unicode.pl --c-output intl-auto-encap-win32.c --h-output intl-auto-encap-win32.h intl-encap-win32.c
|
|
1593
|
1657
|
1594 makeinfo-test: $(DUMP_TARGET)
|
|
1595 @<<makeinfo_test.bat
|
|
1596 @echo off
|
|
1597 @"$(MAKEINFO)" --version
|
|
1598 @if not errorlevel 1 goto test_done
|
|
1599 @$(XEMACS_BATCH_PACKAGES) -eval "(condition-case nil (require (quote texinfo)) (t (kill-emacs 1)))"
|
|
1600 @if not errorlevel 1 goto suggest_makeinfo
|
|
1601 @echo XEmacs 'info' cannot be built!
|
|
1602 @echo Install XEmacs package 'texinfo' (see README.packages).
|
|
1603 :suggest_makeinfo
|
|
1604 @echo Consider specifying path to 'makeinfo' in config.inc.
|
|
1605 @echo as this will build the info docs much faster than XEmacs using 'texinfo'.
|
|
1606 @if errorlevel 1 exit 1
|
|
1607 :test_done
|
|
1608 <<NOKEEP
|