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