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