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