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