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