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