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