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