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