Reduce CPP usage.
[bpt/emacs.git] / src / Makefile.in
CommitLineData
a0528984 1# Makefile for GNU Emacs.
0b5538bd 2# Copyright (C) 1985, 1987, 1988, 1993, 1994, 1995, 1999, 2000, 2001, 2002,
114f9c96 3# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
8cabe764 4# Free Software Foundation, Inc.
a0528984
EZ
5
6# This file is part of GNU Emacs.
7
b9b1cc14 8# GNU Emacs is free software: you can redistribute it and/or modify
a0528984 9# it under the terms of the GNU General Public License as published by
b9b1cc14
GM
10# the Free Software Foundation, either version 3 of the License, or
11# (at your option) any later version.
a0528984
EZ
12
13# GNU Emacs is distributed in the hope that it will be useful,
14# but WITHOUT ANY WARRANTY; without even the implied warranty of
15# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16# GNU General Public License for more details.
17
18# You should have received a copy of the GNU General Public License
b9b1cc14 19# along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
a0528984
EZ
20
21
22# Note that this file is edited by msdos/sed1v2.inp for MSDOS. That
23# script may need modifying in sync with changes made here. Try to
24# avoid shell-ism because the DOS build has to use the DOS shell.
25
5f351ff1 26# Don't try to replace the cpp processing using autoconf facilities,
a0528984 27# says rms.
deeaffe1
DN
28# Replacing a particular part of the conditionals to work via autoconf
29# is OK.
30# Some of the conditionals might be dead now. Finding them and
31# deleting them would be fine.
32
a0528984
EZ
33
34# Here are the things that we expect ../configure to edit.
35# We use $(srcdir) explicitly in dependencies so as not to depend on VPATH.
82c3d67a
AS
36srcdir = @srcdir@
37abs_builddir = @abs_builddir@
38VPATH = $(srcdir)
39CC = @CC@
40CPP = @CPP@
41CFLAGS = @CFLAGS@
42CPPFLAGS = @CPPFLAGS@
43LDFLAGS = @LDFLAGS@
44LN_S = @LN_S@
45EXEEXT = @EXEEXT@
46version = @version@
a0528984
EZ
47# Substitute an assignment for the MAKE variable, because
48# BSD doesn't have it as a default.
49@SET_MAKE@
50# Don't use LIBS. configure puts stuff in it that either shouldn't be
51# linked with Emacs or is duplicated by the cpp stuff below.
52# LIBS = @LIBS@
53LIBOBJS = @LIBOBJS@
54
60a3d7ee 55lispsource = ${srcdir}/../lisp/
60a3d7ee
DN
56libsrc = ../lib-src/
57etc = ../etc/
58oldXMenudir = ../oldXMenu/
59lwlibdir = ../lwlib/
60lispdir = ../lisp/
a0528984
EZ
61
62# Configuration files for .o files to depend on.
63M_FILE = ${srcdir}/@machfile@
64S_FILE = ${srcdir}/@opsysfile@
65config_h = config.h $(M_FILE) $(S_FILE)
66
82c3d67a 67bootstrap_exe = ${abs_builddir}/bootstrap-emacs${EXEEXT}
7763401b 68
005bd5a2
DN
69OTHER_FILES = @OTHER_FILES@
70
70eab5c1
GM
71CRT_DIR=@CRT_DIR@
72
0dc2e11d
GM
73LIBTIFF=@LIBTIFF@
74LIBJPEG=@LIBJPEG@
75LIBPNG=@LIBPNG@
76LIBGIF=@LIBGIF@
77LIBXPM=@LIBXPM@
78XFT_LIBS=@XFT_LIBS@
79
8d9c8ece
DN
80C_SWITCH_SYSTEM=@c_switch_system@
81C_SWITCH_MACHINE=@c_switch_machine@
82
83C_SWITCH_X_SITE=@C_SWITCH_X_SITE@
84
19d4c244
DN
85DBUS_CFLAGS = @DBUS_CFLAGS@
86DBUS_LIBS = @DBUS_LIBS@
10efe302 87DBUS_OBJ = @DBUS_OBJ@
19d4c244
DN
88
89GCONF_CFLAGS = @GCONF_CFLAGS@
90GCONF_LIBS = @GCONF_LIBS@
91
10efe302
GM
92GTK_OBJ=@GTK_OBJ@
93
b678dd8b 94LIBXP=@LIBXP@
10efe302
GM
95LIBXSM=@LIBXSM@
96
97XMENU_OBJ=@XMENU_OBJ@
98XOBJ=@XOBJ@
99
b678dd8b
GM
100LUCID_LIBW=@LUCID_LIBW@
101
19d4c244
DN
102LIBSOUND= @LIBSOUND@
103CFLAGS_SOUND= @CFLAGS_SOUND@
104
105RSVG_LIBS= @RSVG_LIBS@
106RSVG_CFLAGS= @RSVG_CFLAGS@
107
b678dd8b
GM
108## widget.o if USE_X_TOOLKIT, otherwise empty.
109WIDGET_OBJ=@WIDGET_OBJ@
110
2807228d
GM
111LIBSELINUX_LIBS = @LIBSELINUX_LIBS@
112
19d4c244
DN
113INTERVALS_H = dispextern.h intervals.h composite.h
114
115GETLOADAVG_LIBS = @GETLOADAVG_LIBS@
116
117RUN_TEMACS = `/bin/pwd`/temacs
118
a0528984
EZ
119# ========================== start of cpp stuff =======================
120/* From here on, comments must be done in C syntax. */
121
a0528984
EZ
122/* just to be sure the sh is used */
123SHELL=/bin/sh
124
125#define THIS_IS_MAKEFILE
a0528984
EZ
126#define NOT_C_CODE
127#include "config.h"
128
a53cfbe5
JD
129#ifdef AUTO_DEPEND
130DEPFLAGS = -MMD -MF deps/$*.d
131#endif
132
b9465836
DN
133/* Undefine until the user can be moved in the non-cpp section. */
134#undef C_SWITCH_SYSTEM
135#undef C_SWITCH_MACHINE
136#undef C_SWITCH_X_SITE
137
be9b5a60 138/* Do not let the file name mktime.c get messed up. */
a0528984
EZ
139#ifdef mktime
140#undef mktime
141#endif
142
143/* Use HAVE_X11 as an alias for X11 in this file
144 to avoid problems with X11 as a subdirectory name
145 in -I and other such options which pass through this file. */
146
147#ifdef X11
148#define HAVE_X11
149#undef X11
150#endif
151
152/* On some machines #define register is done in config;
be9b5a60 153 do not let it interfere with this file. */
a0528984
EZ
154#undef register
155
be9b5a60 156/* Some machines do not find the standard C libraries in the usual place. */
a0528984
EZ
157#ifndef ORDINARY_LINK
158#ifndef LIB_STANDARD
159#define LIB_STANDARD -lc
160#endif
161#else
162#ifndef LIB_STANDARD
163#define LIB_STANDARD
164#endif
165#endif
166
edfda783 167/* Under GNUstep, putting libc on the link line causes problems. */
122e9f8f 168#ifdef NS_IMPL_GNUSTEP
facfbbbd 169#undef LIB_STANDARD
edfda783
AR
170#define LIB_STANDARD
171#endif
172
a0528984
EZ
173/* Some s/SYSTEM.h files define this to request special libraries. */
174#ifndef LIBS_SYSTEM
175#define LIBS_SYSTEM
176#endif
177
a0528984
EZ
178/* Some s/SYSTEM.h files define this to request special switches in ld. */
179#ifndef LD_SWITCH_SYSTEM
deeaffe1 180#if !defined (__GNUC__) && ((defined (BSD_SYSTEM) && !defined (COFF)))
a0528984 181#define LD_SWITCH_SYSTEM -X
deeaffe1 182#else /* (defined (BSD_SYSTEM) && !defined (COFF)) */
a0528984 183#define LD_SWITCH_SYSTEM
deeaffe1 184#endif /* (defined (BSD_SYSTEM) && !defined (COFF)) */
a0528984
EZ
185#endif /* LD_SWITCH_SYSTEM */
186
187/* This holds special options for linking temacs
188 that should be used for linking anything else. */
189#ifndef LD_SWITCH_SYSTEM_TEMACS
190#define LD_SWITCH_SYSTEM_TEMACS
191#endif
192
193/* Some m/MACHINE.h files define this to request special switches in ld. */
194#ifndef LD_SWITCH_MACHINE
195#define LD_SWITCH_MACHINE
196#endif
197
a0528984 198/* These macros are for switches specifically related to X Windows. */
a0528984
EZ
199#ifndef C_SWITCH_X_SYSTEM
200#define C_SWITCH_X_SYSTEM
201#endif
202
a0528984
EZ
203#ifndef LD_SWITCH_X_SITE
204#define LD_SWITCH_X_SITE
205#endif
206
207#ifndef LD_SWITCH_X_DEFAULT
208#define LD_SWITCH_X_DEFAULT
209#endif
210
a0528984 211STARTFILES = START_FILES
a0528984
EZ
212
213
122e9f8f 214#ifdef NS_IMPL_GNUSTEP
edfda783
AR
215/* Pull in stuff from GNUstep-make. */
216FOUNDATION_LIB=gnu
217GUI_LIB=gnu
facfbbbd
SM
218include @GNUSTEP_MAKEFILES@/Additional/base.make
219include @GNUSTEP_MAKEFILES@/Additional/gui.make
edfda783
AR
220shared=no
221#endif
222
a0528984
EZ
223/* DO NOT use -R. There is a special hack described in lastfile.c
224 which is used instead. Some initialized data areas are modified
225 at initial startup, then labeled as part of the text area when
226 Emacs is dumped for the first time, and never changed again. */
227
228/* -Demacs is needed to make some files produce the correct version
229 for use in Emacs.
230
231 -DHAVE_CONFIG_H is needed for some other files to take advantage of
5aa17bb2 232 the information in ``config.h''. */
a0528984 233
c9b389c0
JD
234#undef C_SWITCH_MACHINE
235#undef C_SWITCH_SYSTEM
236#undef C_SWITCH_X_SITE
237
e769f484 238/* C_SWITCH_X_SITE must come before C_SWITCH_X_SYSTEM
a0528984 239 since it may have -I options that should override those two. */
e769f484 240ALL_CFLAGS=-Demacs -DHAVE_CONFIG_H $(MYCPPFLAGS) -I. -I${srcdir} $(C_SWITCH_MACHINE) $(C_SWITCH_SYSTEM) $(C_SWITCH_X_SITE) C_SWITCH_X_SYSTEM ${CFLAGS_SOUND} ${RSVG_CFLAGS} ${DBUS_CFLAGS} ${GCONF_CFLAGS} ${CFLAGS} @FREETYPE_CFLAGS@ @FONTCONFIG_CFLAGS@ @LIBOTF_CFLAGS@ @M17N_FLT_CFLAGS@ ${DEPFLAGS}
48fad8e8
DN
241ALL_OBJC_CFLAGS=$(ALL_CFLAGS) @GNU_OBJC_CFLAGS@
242
edfda783 243.SUFFIXES: .m
a0528984 244.c.o:
a53cfbe5 245#ifdef AUTO_DEPEND
5d1e70a2 246 @-test -d deps || mkdir deps
a53cfbe5 247#endif
a0528984 248 $(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) $<
edfda783 249.m.o:
a53cfbe5 250#ifdef AUTO_DEPEND
5d1e70a2 251 @-test -d deps || mkdir deps
a53cfbe5 252#endif
48fad8e8 253 $(CC) -c $(CPPFLAGS) $(ALL_OBJC_CFLAGS) $<
a0528984 254
a0528984
EZ
255#ifdef HAVE_X_WINDOWS
256#ifdef HAVE_MENUS
257
a0528984
EZ
258/* The X Menu stuff is present in the X10 distribution, but missing
259 from X11. If we have X10, just use the installed library;
260 otherwise, use our own copy. */
261#ifdef HAVE_X11
262#ifdef USE_X_TOOLKIT
263OLDXMENU=${lwlibdir}liblw.a
264LIBXMENU= $(OLDXMENU)
265#else /* not USE_X_TOOLKIT */
266OLDXMENU= ${oldXMenudir}libXMenu11.a
267LIBXMENU= $(OLDXMENU)
268#endif /* not USE_X_TOOLKIT */
269#else /* not HAVE_X11 */
270LIBXMENU= -lXMenu
271#endif /* not HAVE_X11 */
272
273#else /* not HAVE_MENUS */
274
be9b5a60 275/* Otherwise, do not worry about the menu library at all. */
a0528984
EZ
276LIBXMENU=
277#endif /* not HAVE_MENUS */
278
279#ifdef USE_X_TOOLKIT
73d798d5 280# define @X_TOOLKIT_TYPE@
73d798d5 281# ifdef LIB_MOTIF
b678dd8b 282MOTIF_LIBW= LIB_MOTIF $(LIBXP)
73d798d5 283# else
b678dd8b 284MOTIF_LIBW= -lXm $(LIBXP)
73d798d5
SM
285# endif
286LIBW=$(@X_TOOLKIT_TYPE@_LIBW)
a0528984
EZ
287
288#ifdef HAVE_X11XTR6
289#ifdef NEED_LIBW
290LIBXTR6 = -lSM -lICE -lw
291#else
292LIBXTR6 = -lSM -lICE
293#endif
294#endif
295
296#ifndef LIBXMU
297#define LIBXMU -lXmu
298#endif
299
a0528984 300LIBXT= $(LIBW) LIBXMU -lXt $(LIBXTR6) -lXext
a0528984
EZ
301
302#else /* not USE_X_TOOLKIT */
488dd4c4
JD
303
304#ifdef USE_GTK
305LIBW=@GTK_LIBS@
306OLDXMENU=
307LIBXMENU=
308#endif /* USE_GTK */
309
10efe302 310LIBXT=$(LIBW) $(LIBXSM)
a0528984
EZ
311#endif /* not USE_X_TOOLKIT */
312
a0528984
EZ
313#ifdef HAVE_X11
314/* LD_SWITCH_X_DEFAULT comes after everything else that specifies
315 options for where to find X libraries, but before those libraries. */
316X11_LDFLAGS = LD_SWITCH_X_SITE LD_SWITCH_X_DEFAULT
aaa36002 317LIBX= $(LIBXMENU) $(X11_LDFLAGS) $(LIBXT) $(LIBTIFF) $(LIBJPEG) $(LIBPNG) $(LIBGIF) $(LIBXPM) -lX11 $(XFT_LIBS)
a0528984 318#else /* not HAVE_X11 */
c22140f6 319LIBX= $(LIBXMENU) LD_SWITCH_X_SITE
a0528984
EZ
320#endif /* not HAVE_X11 */
321#endif /* not HAVE_X_WINDOWS */
322
a0528984
EZ
323#ifndef ORDINARY_LINK
324/* Fix linking if compiled with GCC. */
325#ifdef __GNUC__
326
a0528984
EZ
327#ifdef LINKER
328#define LINKER_WAS_SPECIFIED
329#endif
330
331/* Versions of GCC >= 2.0 put their library, libgcc.a, in obscure
332 places that are difficult to figure out at make time. Fortunately,
333 these same versions allow you to pass arbitrary flags on to the
be9b5a60 334 linker, so there is no reason not to use it as a linker.
a0528984 335
be9b5a60 336 Well, it is not quite perfect. The "-nostdlib" keeps GCC from
a0528984
EZ
337 searching for libraries in its internal directories, so we have to
338 ask GCC explicitly where to find libgcc.a. */
339
340#ifndef LINKER
341#define LINKER $(CC) -nostdlib
342#endif
343
344#ifndef LIB_GCC
345/* Ask GCC where to find libgcc.a. */
346#define LIB_GCC `$(CC) -print-libgcc-file-name`
347#endif /* not LIB_GCC */
348
349GNULIB_VAR = LIB_GCC
350
351#ifndef LINKER_WAS_SPECIFIED
352/* GCC passes any argument prefixed with -Xlinker directly to the
be9b5a60 353 linker. See prefix-args.c for an explanation of why we do not do
5aa17bb2 354 this with the shell''s ``for'' construct.
be9b5a60 355 Note that some people do not have '.' in their paths, so we must
a0528984
EZ
356 use ./prefix-args. */
357#define YMF_PASS_LDFLAGS(flags) `./prefix-args -Xlinker flags`
358#else
359#define YMF_PASS_LDFLAGS(flags) flags
360#endif
361
a0528984
EZ
362#else /* not __GNUC__ */
363GNULIB_VAR =
364
365#endif /* not __GNUC__ */
366#endif /* not ORDINARY_LINK */
367
a0528984
EZ
368#ifdef ORDINARY_LINK
369LD = $(CC)
370#else
a0528984
EZ
371#ifdef LINKER
372LD=LINKER
373#else /* not LINKER */
374LD=ld
375#endif /* not LINKER */
a0528984
EZ
376#endif /* not ORDINARY_LINK */
377
dfe15ea3 378/* Flags to pass to LD only for temacs. */
be9b5a60 379/* Do not split this line with a backslash. That can cause trouble with
afb44cc2 380 some cpps. */
a63f80b4 381TEMACS_LDFLAGS = LD_SWITCH_SYSTEM LD_SWITCH_SYSTEM_TEMACS LD_SWITCH_MACHINE
a0528984
EZ
382
383/* A macro which other sections of Makefile can redefine to munge the
be9b5a60 384 flags before they are passed to LD. This is helpful if you have
a0528984
EZ
385 redefined LD to something odd, like "gcc".
386 (The YMF prefix is a holdover from the old name "ymakefile".)
387 */
388#ifndef YMF_PASS_LDFLAGS
389#define YMF_PASS_LDFLAGS(flags) flags
390#endif
391
a0528984
EZ
392#ifdef MSDOS
393#ifdef HAVE_X_WINDOWS
005e19a5 394MSDOS_OBJ = dosfns.o msdos.o xmenu.o
a0528984 395#else
073589f4 396MSDOS_OBJ = dosfns.o msdos.o w16select.o xmenu.o termcap.o
a0528984
EZ
397#endif
398#endif
399
6b61353c
KH
400#ifdef CYGWIN
401CYGWIN_OBJ = sheap.o
402#endif
403
edfda783 404#ifdef HAVE_NS
06b62770
AR
405ns_appdir=@ns_appdir@/
406ns_appbindir=@ns_appbindir@/
407ns_appresdir=@ns_appresdir@/
408ns_appsrc=@ns_appsrc@
edfda783
AR
409/* Object files for NeXTstep */
410NS_OBJ= nsterm.o nsfns.o nsmenu.o nsselect.o nsimage.o nsfont.o \
411 fontset.o fringe.o image.o
edfda783
AR
412#endif /* HAVE_NS */
413
7de94409 414#ifdef HAVE_WINDOW_SYSTEM
7de94409
KH
415#ifdef HAVE_X_WINDOWS
416#if defined (HAVE_XFT)
0f91ebe6 417FONT_DRIVERS = xfont.o ftfont.o xftfont.o ftxfont.o
7de94409 418#elif defined (HAVE_FREETYPE)
0f91ebe6 419FONT_DRIVERS = xfont.o ftfont.o ftxfont.o
7de94409 420#else /* ! defined (HAVE_XFT) && ! defined (HAVE_FREETYPE) */
0f91ebe6 421FONT_DRIVERS = xfont.o
7de94409 422#endif /* ! defined (HAVE_XFT) && ! defined (HAVE_FREETYPE) */
0f91ebe6 423#endif /* HAVE_X_WINDOWS */
7de94409
KH
424#endif /* HAVE_WINDOW_SYSTEM */
425
a0528984
EZ
426/* lastfile must follow all files
427 whose initialized data areas should be dumped as pure by dump-emacs. */
01ef9d36 428obj= dispnew.o frame.o scroll.o xdisp.o menu.o $(XMENU_OBJ) window.o \
f44e260c 429 charset.o coding.o category.o ccl.o character.o chartab.o bidi.o \
033b73e2 430 cm.o term.o terminal.o xfaces.o $(XOBJ) $(GTK_OBJ) $(DBUS_OBJ) \
a0528984
EZ
431 emacs.o keyboard.o macros.o keymap.o sysdep.o \
432 buffer.o filelock.o insdel.o marker.o \
433 minibuf.o fileio.o dired.o filemode.o \
434 cmds.o casetab.o casefiddle.o indent.o search.o regex.o undo.o \
435 alloc.o data.o doc.o editfns.o callint.o \
0f91ebe6 436 eval.o floatfns.o fns.o font.o print.o lread.o \
aaa36002 437 syntax.o @unexec@ bytecode.o \
a0528984
EZ
438 process.o callproc.o \
439 region-cache.o sound.o atimer.o \
440 doprnt.o strftime.o intervals.o textprop.o composite.o md5.o \
9e2a2647 441 $(MSDOS_OBJ) $(NS_OBJ) $(CYGWIN_OBJ) $(FONT_DRIVERS)
a0528984
EZ
442
443/* Object files used on some machine or other.
444 These go in the DOC file on all machines
445 in case they are needed there. */
04a697fe 446SOME_MACHINE_OBJECTS = dosfns.o msdos.o \
d87a9ab8 447 xterm.o xfns.o xmenu.o xselect.o xrdb.o xsmfns.o fringe.o image.o \
25c72475 448 fontset.o dbusbind.o \
a68fda4a 449 nsterm.o nsfns.o nsmenu.o nsselect.o nsimage.o nsfont.o \
c9fc02c7 450 w32.o w32console.o w32fns.o w32heap.o w32inevt.o \
0f91ebe6 451 w32menu.o w32proc.o w32reg.o w32select.o w32term.o w32xfns.o $(FONT_DRIVERS)
a0528984
EZ
452
453
454#ifdef TERMINFO
455/* Used to be -ltermcap here. If your machine needs that,
456 define LIBS_TERMCAP in the m/MACHINE.h file. */
457#ifndef LIBS_TERMCAP
458#define LIBS_TERMCAP -lcurses
459#endif /* LIBS_TERMCAP */
460termcapobj = terminfo.o
461#else /* ! defined (TERMINFO) */
462#ifndef LIBS_TERMCAP
463#define LIBS_TERMCAP
a0528984 464#endif /* LIBS_TERMCAP */
073589f4 465termcapobj = tparam.o
a0528984
EZ
466#endif /* ! defined (TERMINFO) */
467
468
469#ifndef SYSTEM_MALLOC
470
2fa0eedf
RS
471#ifndef DOUG_LEA_MALLOC
472gmallocobj = gmalloc.o
473#endif
474
a0528984 475#ifdef REL_ALLOC
2fa0eedf
RS
476rallocobj = ralloc.o
477#endif
478
479mallocobj = $(gmallocobj) $(rallocobj) vm-limit.o
a0528984
EZ
480
481#endif /* SYSTEM_MALLOC */
482
483
a0528984
EZ
484/* define otherobj as list of object files that make-docfile
485 should not be told about. */
6b61353c
KH
486#ifdef CYGWIN
487/* Cygwin differs because of its unexec(). */
b678dd8b 488otherobj= $(termcapobj) $(gmallocobj) $(rallocobj) lastfile.o vm-limit.o $(WIDGET_OBJ) $(LIBOBJS)
6b61353c 489#else
b678dd8b 490otherobj= $(termcapobj) lastfile.o $(mallocobj) $(WIDGET_OBJ) $(LIBOBJS)
6b61353c 491#endif
a0528984
EZ
492
493#ifdef HAVE_MOUSE
494#define MOUSE_SUPPORT ${lispsource}mouse.elc \
495 ${lispsource}select.elc ${lispsource}scroll-bar.elc
496#else
dd7c5963
NR
497#ifdef HAVE_GPM
498#define MOUSE_SUPPORT ${lispsource}mouse.elc
499#else
a0528984
EZ
500#define MOUSE_SUPPORT
501#endif
dd7c5963 502#endif
a0528984 503
a0528984
EZ
504#ifdef MSDOS
505#define MSDOS_SUPPORT ${lispsource}ls-lisp.elc ${lispsource}disp-table.elc \
e227ba05 506 ${lispsource}dos-fns.elc ${lispsource}dos-w32.elc ${lispsource}dos-vars.elc \
b7d552d6 507 ${lispsource}term/internal.elc ${lispsource}term/pc-win.elc
a0528984
EZ
508
509#else
510#define MSDOS_SUPPORT
511#endif
512
414546fb
NR
513#ifdef HAVE_WINDOW_SYSTEM
514#ifdef HAVE_X_WINDOWS
d76c7a77 515#define WINDOW_SUPPORT ${lispsource}fringe.elc ${lispsource}image.elc \
414546fb 516 ${lispsource}international/fontset.elc ${lispsource}dnd.elc \
b7d552d6 517 ${lispsource}tool-bar.elc ${lispsource}mwheel.elc ${lispsource}x-dnd.elc \
749cebc3 518 ${lispsource}term/common-win.elc ${lispsource}term/x-win.elc \
f904c0f9 519 ${lispsource}dynamic-setting.elc
414546fb 520#else
d76c7a77 521#define WINDOW_SUPPORT ${lispsource}fringe.elc ${lispsource}image.elc \
414546fb
NR
522 ${lispsource}international/fontset.elc ${lispsource}dnd.elc \
523 ${lispsource}tool-bar.elc ${lispsource}mwheel.elc
524#endif
525#else
526#define WINDOW_SUPPORT
527#endif
528
a0528984 529#ifdef WINDOWSNT
1f1bce0e
JR
530#define WINNT_SUPPORT ${lispsource}ls-lisp.elc ${lispsource}disp-table.elc \
531 ${lispsource}dos-w32.elc ${lispsource}w32-vars.elc \
b7d552d6
GM
532 ${lispsource}w32-fns.elc ${lispsource}term/common-win.elc \
533 ${lispsource}term/w32-win.elc
a0528984
EZ
534#else
535#define WINNT_SUPPORT
536#endif
537
875baa34
LT
538#ifdef HAVE_WINDOW_SYSTEM
539#define TOOLTIP_SUPPORT ${lispsource}tooltip.elc
540#else
541#define TOOLTIP_SUPPORT
542#endif
543
b7d552d6
GM
544#ifdef HAVE_NS
545#define NS_SUPPORT ${lispsource}emacs-lisp/easymenu.elc \
546 ${lispsource}term/ns-win.elc
547#else
548#define NS_SUPPORT
549#endif
550
00e2f46c
GM
551/* This is the platform-specific list of Lisp files loaded into the
552 dumped Emacs. It is arranged like this because it is easier to generate
553 it semi-mechanically from loadup.el this way.
a0528984
EZ
554
555 Note that this list should not include lisp files which might not
556 be present, like site-load.el and site-init.el; this makefile
557 expects them all to be either present or buildable.
558
00e2f46c
GM
559 Files which are loaded unconditionally (i.e., on all platforms) should
560 also be in shortlisp. Files which are loaded conditionally (i.e., only
561 on some platforms) should instead be in SOME_MACHINE_LISP. */
a0528984 562
c045cf6e 563/* Place loaddefs.el first, so it gets generated first, since it is on
b4945b95
SM
564 the critical path (relevant in parallel compilations). */
565
a0528984 566lisp= \
b4945b95 567 ${lispsource}loaddefs.el \
a0528984
EZ
568 ${lispsource}abbrev.elc \
569 ${lispsource}buff-menu.elc \
aae5b722 570 ${lispsource}button.elc \
f984e73e 571 ${lispsource}emacs-lisp/byte-run.elc \
731055f5 572 ${lispsource}composite.elc \
bfcf6dbe 573 ${lispsource}cus-face.elc \
d381a855 574 ${lispsource}cus-start.elc \
a0528984 575 ${lispsource}custom.elc \
6e860d15 576 ${lispsource}emacs-lisp/backquote.elc \
a0528984
EZ
577 ${lispsource}emacs-lisp/lisp-mode.elc \
578 ${lispsource}emacs-lisp/lisp.elc \
579 ${lispsource}env.elc \
580 ${lispsource}faces.elc \
581 ${lispsource}files.elc \
582 ${lispsource}format.elc \
583 ${lispsource}facemenu.elc \
584 MOUSE_SUPPORT \
f984e73e 585 ${lispsource}emacs-lisp/float-sup.elc \
af0ad939 586 ${lispsource}frame.elc \
a0528984
EZ
587 ${lispsource}help.elc \
588 ${lispsource}indent.elc \
589 ${lispsource}isearch.elc \
29f05691 590 ${lispsource}rfn-eshadow.elc \
a0528984 591 ${lispsource}loadup.el \
aae5b722 592 ${lispsource}bindings.elc \
f984e73e 593 ${lispsource}emacs-lisp/map-ynp.elc \
a0528984
EZ
594 ${lispsource}menu-bar.elc \
595 ${lispsource}international/mule.elc \
e118d2be 596 ${lispsource}international/mule-conf.elc \
a0528984
EZ
597 ${lispsource}international/mule-cmds.elc \
598 ${lispsource}international/characters.elc \
15e2814c 599 ${lispsource}international/charprop.el \
a0528984 600 ${lispsource}case-table.elc \
e118d2be
AS
601 ${lispsource}language/chinese.elc \
602 ${lispsource}language/cyrillic.elc \
7e694795 603 ${lispsource}language/indian.elc \
cc8d1311 604 ${lispsource}language/sinhala.el \
74fc84af 605 ${lispsource}language/english.el \
a0528984
EZ
606 ${lispsource}language/ethiopic.elc \
607 ${lispsource}language/european.elc \
74fc84af
EZ
608 ${lispsource}language/czech.el \
609 ${lispsource}language/slovak.el \
610 ${lispsource}language/romanian.el \
611 ${lispsource}language/greek.el \
612 ${lispsource}language/hebrew.el \
613 ${lispsource}language/japanese.el \
614 ${lispsource}language/korean.el \
615 ${lispsource}language/lao.el \
c9228487 616 ${lispsource}language/cham.el \
16460a76 617 ${lispsource}language/tai-viet.el \
74fc84af 618 ${lispsource}language/thai.el \
a0528984 619 ${lispsource}language/tibetan.elc \
e118d2be 620 ${lispsource}language/vietnamese.elc \
74fc84af 621 ${lispsource}language/misc-lang.el \
1e9a6186
DL
622 ${lispsource}language/utf-8-lang.el \
623 ${lispsource}language/georgian.el \
0e45710c 624 ${lispsource}language/khmer.el \
7f6519c5 625 ${lispsource}language/burmese.el \
a0528984
EZ
626 ${lispsource}paths.el \
627 ${lispsource}register.elc \
628 ${lispsource}replace.elc \
629 ${lispsource}simple.elc \
32bae13c 630 ${lispsource}minibuffer.elc \
a0528984
EZ
631 ${lispsource}startup.elc \
632 ${lispsource}subr.elc \
633 ${lispsource}term/tty-colors.elc \
bfcf6dbe 634 ${lispsource}font-core.elc \
1f7b1131
DN
635 ${lispsource}emacs-lisp/syntax.elc \
636 ${lispsource}font-lock.elc \
637 ${lispsource}jit-lock.elc \
a0528984
EZ
638 ${lispsource}textmodes/fill.elc \
639 ${lispsource}textmodes/page.elc \
640 ${lispsource}textmodes/paragraphs.elc \
641 ${lispsource}textmodes/text-mode.elc \
f984e73e 642 ${lispsource}emacs-lisp/timer.elc \
6e6851b0 643 ${lispsource}jka-cmpr-hook.elc \
a0528984
EZ
644 ${lispsource}vc-hooks.elc \
645 ${lispsource}ediff-hook.elc \
86914123 646 ${lispsource}epa-hook.elc \
875baa34 647 TOOLTIP_SUPPORT \
a0528984
EZ
648 MSDOS_SUPPORT \
649 WINNT_SUPPORT \
414546fb 650 WINDOW_SUPPORT \
b7d552d6 651 NS_SUPPORT \
a0528984
EZ
652 ${lispsource}widget.elc \
653 ${lispsource}window.elc \
654 ${lispsource}version.el
655
00e2f46c
GM
656/* List of relative names for those files from $lisp that are loaded
657 unconditionally (i.e. on all platforms). Files from $lisp that
658 are only loaded on some platforms should instead be placed in
659 SOME_MACHINE_LISP. The only reason this variable exists is to prevent
660 the make-docfile command-line getting too long for some systems. */
a0528984 661shortlisp= \
b4945b95 662 ../lisp/loaddefs.el \
a0528984
EZ
663 ../lisp/abbrev.elc \
664 ../lisp/buff-menu.elc \
aae5b722 665 ../lisp/button.elc \
f984e73e 666 ../lisp/emacs-lisp/byte-run.elc \
731055f5 667 ../lisp/composite.elc \
bfcf6dbe 668 ../lisp/cus-face.elc \
d381a855 669 ../lisp/cus-start.elc \
a0528984 670 ../lisp/custom.elc \
f7d5d963 671 ../lisp/emacs-lisp/backquote.elc \
a0528984
EZ
672 ../lisp/emacs-lisp/lisp-mode.elc \
673 ../lisp/emacs-lisp/lisp.elc \
674 ../lisp/facemenu.elc \
675 ../lisp/faces.elc \
676 ../lisp/files.elc \
f984e73e 677 ../lisp/emacs-lisp/float-sup.elc \
a0528984
EZ
678 ../lisp/format.elc \
679 ../lisp/frame.elc \
680 ../lisp/help.elc \
681 ../lisp/indent.elc \
682 ../lisp/isearch.elc \
29f05691 683 ../lisp/rfn-eshadow.elc \
a0528984 684 ../lisp/loadup.el \
aae5b722 685 ../lisp/bindings.elc \
f984e73e 686 ../lisp/emacs-lisp/map-ynp.elc \
a0528984
EZ
687 ../lisp/env.elc \
688 ../lisp/international/mule.elc \
e118d2be 689 ../lisp/international/mule-conf.elc \
a0528984
EZ
690 ../lisp/international/mule-cmds.elc \
691 ../lisp/international/characters.elc \
692 ../lisp/case-table.elc \
e118d2be
AS
693 ../lisp/language/chinese.elc \
694 ../lisp/language/cyrillic.elc \
7e694795 695 ../lisp/language/indian.elc \
cc8d1311 696 ../lisp/language/sinhala.el \
74fc84af 697 ../lisp/language/english.el \
a0528984
EZ
698 ../lisp/language/ethiopic.elc \
699 ../lisp/language/european.elc \
74fc84af
EZ
700 ../lisp/language/czech.el \
701 ../lisp/language/slovak.el \
702 ../lisp/language/romanian.el \
703 ../lisp/language/greek.el \
704 ../lisp/language/hebrew.el \
705 ../lisp/language/japanese.el \
706 ../lisp/language/korean.el \
707 ../lisp/language/lao.el \
c9228487 708 ../lisp/language/cham.el \
16460a76 709 ../lisp/language/tai-viet.el \
74fc84af 710 ../lisp/language/thai.el \
a0528984 711 ../lisp/language/tibetan.elc \
e118d2be 712 ../lisp/language/vietnamese.elc \
74fc84af 713 ../lisp/language/misc-lang.el \
1e9a6186
DL
714 ../lisp/language/utf-8-lang.el \
715 ../lisp/language/georgian.el \
0e45710c 716 ../lisp/language/khmer.el \
7f6519c5 717 ../lisp/language/burmese.el \
f7d5d963 718 ../lisp/menu-bar.elc \
a0528984
EZ
719 ../lisp/paths.el \
720 ../lisp/register.elc \
721 ../lisp/replace.elc \
722 ../lisp/simple.elc \
32bae13c 723 ../lisp/minibuffer.elc \
a0528984
EZ
724 ../lisp/startup.elc \
725 ../lisp/subr.elc \
726 ../lisp/term/tty-colors.elc \
59809627 727 ../lisp/font-core.elc \
1f7b1131
DN
728 ../lisp/emacs-lisp/syntax.elc \
729 ../lisp/font-lock.elc \
730 ../lisp/jit-lock.elc \
a0528984
EZ
731 ../lisp/textmodes/fill.elc \
732 ../lisp/textmodes/page.elc \
733 ../lisp/textmodes/paragraphs.elc \
734 ../lisp/textmodes/text-mode.elc \
f984e73e 735 ../lisp/emacs-lisp/timer.elc \
a0528984 736 ../lisp/vc-hooks.elc \
6e6851b0 737 ../lisp/jka-cmpr-hook.elc \
a0528984 738 ../lisp/ediff-hook.elc \
86914123 739 ../lisp/epa-hook.elc \
a0528984
EZ
740 ../lisp/widget.elc \
741 ../lisp/window.elc \
742 ../lisp/version.el
743
00e2f46c
GM
744/* Like $shortlisp, but includes only those files from $lisp that are loaded
745 conditionally (i.e., only on some platforms). */
60a3d7ee
DN
746SOME_MACHINE_LISP = ../lisp/mouse.elc \
747 ../lisp/select.elc ../lisp/scroll-bar.elc \
60a3d7ee
DN
748 ../lisp/ls-lisp.elc ../lisp/dos-fns.elc \
749 ../lisp/w32-fns.elc ../lisp/dos-w32.elc \
750 ../lisp/disp-table.elc ../lisp/dos-vars.elc \
751 ../lisp/tooltip.elc ../lisp/image.elc \
752 ../lisp/fringe.elc ../lisp/dnd.elc \
753 ../lisp/mwheel.elc ../lisp/tool-bar.elc \
f904c0f9 754 ../lisp/x-dnd.elc ../lisp/dynamic-setting.elc \
60a3d7ee 755 ../lisp/international/ccl.elc \
60a3d7ee
DN
756 ../lisp/international/fontset.elc \
757 ../lisp/mouse.elc \
24ed93fb 758 ../lisp/term/common-win.elc \
7206e7b7 759 ../lisp/term/x-win.elc \
e227ba05 760 ../lisp/term/pc-win.elc ../lisp/term/internal.elc \
b7d552d6
GM
761 ../lisp/term/ns-win.elc ../lisp/term/w32-win.elc \
762 ../lisp/emacs-lisp/easymenu.elc
a0528984
EZ
763
764/* Construct full set of libraries to be linked.
765 Note that SunOS needs -lm to come before -lc; otherwise, you get
766 duplicated symbols. If the standard libraries were compiled
767 with GCC, we might need gnulib again after them. */
edfda783 768
033b73e2 769LIBES = $(LOADLIBES) $(LIBS) $(LIBX) $(LIBSOUND) $(RSVG_LIBS) $(DBUS_LIBS) \
10ccb130 770 @LIBGPM@ @LIBRESOLV@ LIBS_SYSTEM LIBS_TERMCAP \
574c05e2 771 $(GETLOADAVG_LIBS) ${GCONF_LIBS} ${LIBSELINUX_LIBS} \
ac96711a 772 @FREETYPE_LIBS@ @FONTCONFIG_LIBS@ @LIBOTF_LIBS@ @M17N_FLT_LIBS@ \
9452ded1 773 $(GNULIB_VAR) @LIB_MATH@ LIB_STANDARD $(GNULIB_VAR)
a0528984 774
005bd5a2 775all: emacs${EXEEXT} $(OTHER_FILES)
a0528984 776
0c2b6f8e 777emacs${EXEEXT}: temacs${EXEEXT} ${etc}DOC ${lisp}
a0528984 778#ifdef CANNOT_DUMP
108c7c97
AS
779 rm -f emacs${EXEEXT}
780 ln temacs${EXEEXT} emacs${EXEEXT}
c8edcc01 781 -EMACSLOADPATH=${lispsource} ./emacs -q -batch -f list-load-path-shadows
a0528984 782#else
83f1cb94 783 LC_ALL=C $(RUN_TEMACS) -batch -l loadup dump
fc46d219
SM
784 @: This new Emacs is as functional and more efficient then
785 @: bootstrap-emacs, so let us replace it.
786 -ln -f emacs${EXEEXT} bootstrap-emacs${EXEEXT}
a0528984 787 -./emacs -q -batch -f list-load-path-shadows
c8edcc01 788#endif /* ! defined (CANNOT_DUMP) */
a0528984
EZ
789
790/* We run make-docfile twice because the command line may get too long
791 on some systems. */
792/* ${SOME_MACHINE_OBJECTS} comes before ${obj} because some files may
793 or may not be included in ${obj}, but they are always included in
794 ${SOME_MACHINE_OBJECTS}. Since a file is processed when it is mentioned
795 for the first time, this prevents any variation between configurations
796 in the contents of the DOC file.
797 Likewise for ${SOME_MACHINE_LISP}. */
d7c664f3
SM
798/* Most of this Makefile refers to Lisp files via ${lispsource}, so
799 we also use ${lisp} rather than ${shortlisp} for the dependency since
800 the Makefile uses string equality to decide when we talk about identical
801 files. Apparently we pass ${shortlisp} rather than ${lisp} to make-docfile
802 only in order to reduce the command line length. --Stef */
803${etc}DOC: ${libsrc}make-docfile${EXEEXT} ${obj} ${lisp} ${SOME_MACHINE_LISP}
a0528984
EZ
804 -rm -f ${etc}DOC
805 ${libsrc}make-docfile -d ${srcdir} ${SOME_MACHINE_OBJECTS} ${obj} > ${etc}DOC
806 ${libsrc}make-docfile -a ${etc}DOC -d ${srcdir} ${SOME_MACHINE_LISP} ${shortlisp}
807
108c7c97
AS
808${libsrc}make-docfile${EXEEXT}:
809 cd ${libsrc}; ${MAKE} ${MFLAGS} make-docfile${EXEEXT}
a0528984 810
878bde49 811buildobj.h: Makefile
005bd5a2 812 echo "#define BUILDOBJ \"${obj} ${otherobj} " "\"" > buildobj.h
878bde49 813
005bd5a2 814temacs${EXEEXT}: $(LOCALCPP) $(STARTFILES) stamp-oldxmenu ${obj} ${otherobj} prefix-args${EXEEXT}
122e9f8f 815#ifdef NS_IMPL_GNUSTEP
a2d3af1c 816 $(CC) -rdynamic YMF_PASS_LDFLAGS ( ${TEMACS_LDFLAGS} \
f412b180 817 -L@GNUSTEP_SYSTEM_LIBRARIES@ -lgnustep-gui -lgnustep-base \
a2d3af1c 818 -lobjc $(CONFIG_SYSTEM_LIBS) -lpthread ) -o temacs \
005bd5a2 819 ${obj} ${otherobj} ${LIBES}
edfda783 820#else
dfe15ea3 821 $(LD) YMF_PASS_LDFLAGS (${STARTFLAGS} ${TEMACS_LDFLAGS}) $(LDFLAGS) \
a0528984 822 -o temacs ${STARTFILES} ${obj} ${otherobj} \
005bd5a2 823 ${LIBES}
edfda783 824#endif
a0528984 825
be9b5a60 826/* We do not use ALL_LDFLAGS because LD_SWITCH_SYSTEM and LD_SWITCH_MACHINE
5aa17bb2 827 often contain options that have to do with using Emacs''s crt0,
a0528984 828 which are only good with temacs. */
a53cfbe5 829prefix-args${EXEEXT}: prefix-args.o $(config_h)
f4c21026 830 $(CC) $(LDFLAGS) prefix-args.o -o prefix-args
a0528984 831
a51f4969 832#if defined (HAVE_X_WINDOWS) && defined (HAVE_X11) && defined (HAVE_MENUS) && ! defined (USE_GTK)
a0528984
EZ
833
834/* We use stamp-xmenu with these two deps
835 to both ensure that lwlib gets remade based on its dependencies
836 in its own makefile,
837 and remake temacs if lwlib gets changed by this. */
c60ee5e7 838stamp-oldxmenu: ${OLDXMENU} ../src/$(OLDXMENU)
a0528984
EZ
839 touch stamp-oldxmenu
840/* Supply an ordering for parallel make. */
841../src/$(OLDXMENU): ${OLDXMENU}
842
a0528984
EZ
843/* Encode the values of these two macros in Make variables,
844 so we can use $(...) to substitute their values within "...". */
a0528984 845C_SWITCH_X_SYSTEM_1 = C_SWITCH_X_SYSTEM
deeaffe1
DN
846
847#ifdef USE_X_TOOLKIT
848$(OLDXMENU): really-lwlib
849
a0528984 850really-lwlib:
6b61353c 851 cd ${lwlibdir}; ${MAKE} ${MFLAGS} \
a0528984 852 CC='${CC}' CFLAGS='${CFLAGS}' MAKE='${MAKE}' \
8d9c8ece 853 "C_SWITCH_X_SYSTEM=$(C_SWITCH_X_SYSTEM_1)"
a0528984
EZ
854 @true /* make -t should not create really-lwlib. */
855.PHONY: really-lwlib
856#else /* not USE_X_TOOLKIT */
857$(OLDXMENU): really-oldXMenu
858
a0528984 859really-oldXMenu:
9c28b587 860 cd ${oldXMenudir}; ${MAKE} ${MFLAGS} \
a0528984 861 CC='${CC}' CFLAGS='${CFLAGS}' MAKE='${MAKE}' \
8d9c8ece 862 "C_SWITCH_X_SYSTEM=$(C_SWITCH_X_SYSTEM_1)"
a0528984
EZ
863 @true /* make -t should not create really-oldXMenu. */
864.PHONY: really-oldXMenu
865#endif /* not USE_X_TOOLKIT */
a51f4969 866#else /* not (HAVE_X_WINDOWS && HAVE_X11 && HAVE_MENUS && ! USE_GTK) */
a0528984 867
5aa17bb2 868/* We don''t really need this, but satisfy the dependency. */
a0528984
EZ
869stamp-oldxmenu:
870 touch stamp-oldxmenu
a51f4969 871#endif /* not (HAVE_X_WINDOWS && HAVE_X11 && HAVE_MENUS && ! USE_GTK) */
a0528984
EZ
872
873../config.status:: epaths.in
874 @echo "The file epaths.h needs to be set up from epaths.in."
875 @echo "Please run the `configure' script again."
876 exit 1
877
878../config.status:: config.in
879 @echo "The file config.h needs to be set up from config.in."
880 @echo "Please run the `configure' script again."
881 exit 1
882
a53cfbe5 883ecrt0.o: ecrt0.c $(config_h)
cfc86c7a
JD
884#ifdef AUTO_DEPEND
885 @-test -d deps || mkdir deps
886#endif
19d4c244 887 $(CC) -c $(ALL_CFLAGS) ${srcdir}/ecrt0.c
a53cfbe5
JD
888doc.o: buildobj.h
889
890#ifndef AUTO_DEPEND
a0528984 891
3f670e9a
EZ
892atimer.o: atimer.c atimer.h syssignal.h systime.h lisp.h blockinput.h \
893 $(config_h)
ad55bd46 894bidi.o: bidi.c buffer.h character.h dispextern.h lisp.h $(config_h)
a0528984 895buffer.o: buffer.c buffer.h region-cache.h commands.h window.h \
3f670e9a
EZ
896 $(INTERVALS_H) blockinput.h atimer.h systime.h character.h \
897 indent.h keyboard.h coding.h keymap.h frame.h lisp.h $(config_h)
21065c92 898callint.o: callint.c window.h commands.h buffer.h keymap.h \
3f670e9a 899 keyboard.h dispextern.h systime.h coding.h composite.h lisp.h $(config_h)
0a5d24ae 900callproc.o: callproc.c epaths.h buffer.h commands.h lisp.h $(config_h) \
8f924df7 901 process.h systty.h syssignal.h character.h coding.h ccl.h msdos.h \
3f670e9a
EZ
902 composite.h w32.h blockinput.h atimer.h systime.h frame.h termhooks.h \
903 buffer.h
85969c22 904casefiddle.o: casefiddle.c syntax.h commands.h buffer.h character.h \
3f670e9a
EZ
905 composite.h keymap.h lisp.h $(config_h)
906casetab.o: casetab.c buffer.h character.h lisp.h $(config_h)
a63aa692 907category.o: category.c category.h buffer.h charset.h keymap.h \
0a5d24ae 908 character.h lisp.h $(config_h)
3f670e9a 909ccl.o: ccl.c ccl.h charset.h character.h coding.h composite.h lisp.h $(config_h)
85969c22 910character.o: character.c character.h buffer.h charset.h composite.h disptab.h \
0a5d24ae 911 lisp.h $(config_h)
85969c22 912charset.o: charset.c charset.h character.h buffer.h coding.h composite.h \
0a5d24ae 913 disptab.h lisp.h $(config_h)
3f670e9a
EZ
914chartab.o: charset.h character.h ccl.h lisp.h $(config_h)
915coding.o: coding.c coding.h ccl.h buffer.h character.h charset.h composite.h \
0a5d24ae 916 window.h dispextern.h frame.h termhooks.h lisp.h $(config_h)
3f670e9a 917cm.o: cm.c frame.h cm.h termhooks.h termchar.h dispextern.h lisp.h $(config_h)
0a5d24ae 918cmds.o: cmds.c syntax.h buffer.h character.h commands.h window.h lisp.h $(config_h) \
3f670e9a
EZ
919 msdos.h dispextern.h keyboard.h keymap.h systime.h coding.h frame.h \
920 composite.h
a0528984 921pre-crt0.o: pre-crt0.c
0a5d24ae
DN
922dbusbind.o: dbusbind.c termhooks.h frame.h keyboard.h lisp.h $(config_h)
923dired.o: dired.c commands.h buffer.h lisp.h $(config_h) character.h charset.h \
3f670e9a
EZ
924 coding.h regex.h systime.h blockinput.h atimer.h composite.h
925dispnew.o: dispnew.c systime.h commands.h process.h frame.h coding.h \
926 window.h buffer.h termchar.h termopts.h termhooks.h cm.h \
bd7bbf29 927 disptab.h indent.h $(INTERVALS_H) \
3f670e9a 928 xterm.h blockinput.h atimer.h character.h msdos.h keyboard.h \
0a5d24ae 929 syssignal.h lisp.h $(config_h)
3f670e9a
EZ
930doc.o: doc.c lisp.h $(config_h) epaths.h buffer.h keyboard.h keymap.h \
931 character.h systime.h coding.h composite.h
0a5d24ae 932doprnt.o: doprnt.c character.h lisp.h $(config_h)
21065c92 933dosfns.o: buffer.h termchar.h termhooks.h frame.h blockinput.h window.h \
ffb72b67 934 msdos.h dosfns.h dispextern.h charset.h coding.h atimer.h systime.h \
0a5d24ae 935 lisp.h $(config_h)
bd7bbf29 936editfns.o: editfns.c window.h buffer.h systime.h $(INTERVALS_H) character.h \
3f670e9a 937 coding.h frame.h blockinput.h atimer.h lisp.h $(config_h)
a0528984 938emacs.o: emacs.c commands.h systty.h syssignal.h blockinput.h process.h \
0a5d24ae 939 termhooks.h buffer.h atimer.h systime.h $(INTERVALS_H) lisp.h $(config_h) \
3f670e9a 940 window.h dispextern.h keyboard.h keymap.h frame.h coding.h
bd7bbf29 941fileio.o: fileio.c window.h buffer.h systime.h $(INTERVALS_H) character.h \
3f670e9a
EZ
942 coding.h msdos.h blockinput.h atimer.h lisp.h $(config_h) frame.h commands.h
943filelock.o: filelock.c buffer.h character.h coding.h systime.h composite.h \
944 lisp.h $(config_h)
945filemode.o: filemode.c $(config_h)
a0528984 946frame.o: frame.c xterm.h window.h frame.h termhooks.h commands.h keyboard.h \
08b3caa9 947 blockinput.h atimer.h systime.h buffer.h character.h fontset.h font.h \
3f670e9a
EZ
948 msdos.h dosfns.h dispextern.h w32term.h termchar.h coding.h composite.h \
949 lisp.h $(config_h) termhooks.h ccl.h
950fringe.o: fringe.c dispextern.h frame.h window.h buffer.h termhooks.h \
951 blockinput.h atimer.h systime.h lisp.h $(config_h)
08b1e593 952font.o: font.c dispextern.h frame.h window.h ccl.h character.h charset.h \
3f670e9a 953 font.h lisp.h $(config_h) buffer.h composite.h fontset.h xterm.h
6b7f0860 954ftfont.o: dispextern.h frame.h character.h charset.h composite.h font.h \
3f670e9a
EZ
955 lisp.h $(config_h) blockinput.h atimer.h systime.h coding.h fontset.h \
956 ccl.h ftfont.h
957fontset.o: fontset.c fontset.h ccl.h buffer.h character.h \
958 charset.h frame.h keyboard.h termhooks.h font.h lisp.h $(config_h) \
959 blockinput.h atimer.h systime.h coding.h $(INTERVALS_H) window.h xterm.h
a0528984 960getloadavg.o: getloadavg.c $(config_h)
0a5d24ae 961gtkutil.o: gtkutil.c gtkutil.h xterm.h lisp.h frame.h lisp.h $(config_h) \
b9fd67bd 962 blockinput.h window.h atimer.h systime.h termhooks.h keyboard.h \
3f670e9a 963 charset.h coding.h syssignal.h dispextern.h composite.h
6b61353c 964image.o: image.c frame.h window.h dispextern.h blockinput.h atimer.h \
3f670e9a
EZ
965 systime.h xterm.h w32term.h w32gui.h font.h epaths.h character.h coding.h \
966 nsterm.h nsgui.h lisp.h $(config_h) composite.h termhooks.h ccl.h
0a5d24ae 967indent.o: indent.c frame.h window.h indent.h buffer.h lisp.h $(config_h) termchar.h \
3f670e9a
EZ
968 termopts.h disptab.h region-cache.h character.h category.h \
969 keyboard.h systime.h coding.h $(INTERVALS_H)
bd7bbf29 970insdel.o: insdel.c window.h buffer.h $(INTERVALS_H) blockinput.h character.h \
0a5d24ae 971 dispextern.h atimer.h systime.h region-cache.h lisp.h $(config_h)
85969c22 972keyboard.o: keyboard.c termchar.h termhooks.h termopts.h buffer.h character.h \
a0528984 973 commands.h frame.h window.h macros.h disptab.h keyboard.h syssignal.h \
3f670e9a
EZ
974 systime.h syntax.h $(INTERVALS_H) blockinput.h atimer.h composite.h \
975 xterm.h puresize.h msdos.h keymap.h w32term.h nsterm.h coding.h \
0a5d24ae 976 lisp.h $(config_h)
a0528984 977keymap.o: keymap.c buffer.h commands.h keyboard.h termhooks.h blockinput.h \
bd7bbf29 978 atimer.h systime.h puresize.h character.h charset.h $(INTERVALS_H) keymap.h window.h \
3f670e9a 979 coding.h frame.h lisp.h $(config_h)
0a5d24ae 980lastfile.o: lastfile.c $(config_h)
a0528984 981macros.o: macros.c window.h buffer.h commands.h macros.h keyboard.h \
3f670e9a 982 dispextern.h lisp.h $(config_h) systime.h coding.h composite.h
a0528984 983gmalloc.o: gmalloc.c $(config_h)
0a5d24ae
DN
984ralloc.o: ralloc.c lisp.h $(config_h)
985vm-limit.o: vm-limit.c mem-limits.h lisp.h $(config_h)
986marker.o: marker.c buffer.h character.h lisp.h $(config_h)
39c9a034 987md5.o: md5.c md5.h $(config_h)
3f670e9a 988minibuf.o: minibuf.c syntax.h frame.h window.h keyboard.h systime.h \
bd7bbf29 989 buffer.h commands.h character.h msdos.h $(INTERVALS_H) keymap.h \
3f670e9a 990 termhooks.h lisp.h $(config_h) coding.h
a0528984 991mktime.o: mktime.c $(config_h)
a0528984 992msdos.o: msdos.c msdos.h dosfns.h systime.h termhooks.h dispextern.h frame.h \
85969c22 993 termopts.h termchar.h character.h coding.h ccl.h disptab.h window.h \
0a5d24ae 994 keyboard.h $(INTERVALS_H) buffer.h commands.h blockinput.h atimer.h lisp.h $(config_h)
55737942 995nsfns.o: nsfns.m charset.h nsterm.h nsgui.h frame.h window.h buffer.h \
bd7bbf29 996 dispextern.h nsgui.h fontset.h $(INTERVALS_H) keyboard.h blockinput.h \
0a5d24ae
DN
997 atimer.h systime.h epaths.h termhooks.h coding.h systime.h lisp.h $(config_h)
998nsfont.o: nsterm.h dispextern.h frame.h lisp.h lisp.h $(config_h)
999nsimage.o: nsimage.m nsterm.h lisp.h $(config_h)
55737942
AR
1000nsmenu.o: nsmenu.m termhooks.h frame.h window.h dispextern.h \
1001 nsgui.h keyboard.h blockinput.h atimer.h systime.h buffer.h \
0a5d24ae 1002 nsterm.h lisp.h $(config_h)
55737942
AR
1003nsterm.o: nsterm.m blockinput.h atimer.h systime.h syssignal.h nsterm.h \
1004 nsgui.h frame.h charset.h ccl.h dispextern.h fontset.h termhooks.h \
1005 termopts.h termchar.h disptab.h buffer.h window.h keyboard.h \
0a5d24ae
DN
1006 $(INTERVALS_H) process.h coding.h lisp.h $(config_h)
1007nsselect.o: nsselect.m blockinput.h nsterm.h nsgui.h frame.h lisp.h $(config_h)
a0528984
EZ
1008process.o: process.c process.h buffer.h window.h termhooks.h termopts.h \
1009 commands.h syssignal.h systime.h systty.h syswait.h frame.h dispextern.h \
1010 blockinput.h atimer.h charset.h coding.h ccl.h msdos.h composite.h \
3f670e9a
EZ
1011 keyboard.h lisp.h $(config_h) character.h xgselect.h sysselect.h
1012regex.o: regex.c syntax.h buffer.h lisp.h $(config_h) regex.h category.h character.h
0a5d24ae 1013region-cache.o: region-cache.c buffer.h region-cache.h lisp.h $(config_h)
a0528984 1014scroll.o: scroll.c termchar.h dispextern.h frame.h msdos.h keyboard.h \
3f670e9a 1015 termhooks.h lisp.h $(config_h) systime.h coding.h composite.h window.h
a0528984 1016search.o: search.c regex.h commands.h buffer.h region-cache.h syntax.h \
6660e3a8 1017 blockinput.h atimer.h systime.h category.h character.h charset.h \
3f670e9a 1018 $(INTERVALS_H) \
0a5d24ae 1019 lisp.h $(config_h)
3f670e9a 1020sound.o: sound.c dispextern.h syssignal.h lisp.h $(config_h) atimer.h systime.h
a0528984 1021strftime.o: strftime.c $(config_h)
85969c22 1022syntax.o: syntax.c syntax.h buffer.h commands.h category.h character.h \
3f670e9a 1023 keymap.h regex.h $(INTERVALS_H) lisp.h $(config_h)
4524691f 1024sysdep.o: sysdep.c syssignal.h systty.h systime.h syswait.h blockinput.h \
3f670e9a
EZ
1025 process.h dispextern.h termhooks.h termchar.h termopts.h coding.h \
1026 frame.h atimer.h window.h msdos.h dosfns.h keyboard.h cm.h lisp.h $(config_h) \
1027 composite.h
0a5d24ae 1028term.o: term.c termchar.h termhooks.h termopts.h lisp.h $(config_h) cm.h frame.h \
3f670e9a 1029 disptab.h keyboard.h character.h charset.h coding.h ccl.h xterm.h \
f78c2c97 1030 msdos.h window.h keymap.h blockinput.h atimer.h systime.h systty.h \
3f670e9a 1031 syssignal.h $(INTERVALS_H) buffer.h
0a5d24ae 1032termcap.o: termcap.c lisp.h $(config_h)
ed8dad6b 1033terminal.o: terminal.c frame.h termchar.h termhooks.h charset.h coding.h \
3f670e9a 1034 keyboard.h lisp.h $(config_h) dispextern.h composite.h systime.h
0a5d24ae
DN
1035terminfo.o: terminfo.c lisp.h $(config_h)
1036tparam.o: tparam.c lisp.h $(config_h)
3f670e9a 1037undo.o: undo.c buffer.h commands.h window.h dispextern.h lisp.h $(config_h)
0a5d24ae 1038unexaix.o: unexaix.c lisp.h $(config_h)
f2a77c3a 1039unexalpha.o: unexalpha.c $(config_h)
0a5d24ae
DN
1040unexcw.o: unexcw.c lisp.h $(config_h)
1041unexec.o: unexec.c lisp.h $(config_h)
f2a77c3a
DN
1042unexelf.o: unexelf.c $(config_h)
1043unexhp9k800.o: unexhp9k800.c $(config_h)
1044unexmacosx.o: unexmacosx.c $(config_h)
0a5d24ae 1045unexsol.o: unexsol.c lisp.h $(config_h)
f2a77c3a 1046unexw32.o: unexw32.c $(config_h)
a0528984 1047w16select.o: w16select.c dispextern.h frame.h blockinput.h atimer.h systime.h \
0a5d24ae 1048 msdos.h buffer.h charset.h coding.h composite.h lisp.h $(config_h)
a0528984 1049widget.o: widget.c xterm.h frame.h dispextern.h widgetprv.h \
0a5d24ae 1050 $(srcdir)/../lwlib/lwlib.h lisp.h $(config_h)
a0528984 1051window.o: window.c indent.h commands.h frame.h window.h buffer.h termchar.h \
3f670e9a 1052 disptab.h keyboard.h msdos.h coding.h termhooks.h \
bd7bbf29 1053 keymap.h blockinput.h atimer.h systime.h $(INTERVALS_H) \
0a5d24ae 1054 xterm.h w32term.h nsterm.h lisp.h $(config_h)
a63aa692
MB
1055xdisp.o: xdisp.c macros.h commands.h process.h indent.h buffer.h dispextern.h \
1056 coding.h termchar.h frame.h window.h disptab.h termhooks.h character.h \
0a5d24ae 1057 charset.h lisp.h $(config_h) keyboard.h $(INTERVALS_H) region-cache.h xterm.h \
3f670e9a 1058 w32term.h nsterm.h msdos.h composite.h fontset.h ccl.h \
08b3caa9 1059 blockinput.h atimer.h systime.h keymap.h font.h
a63aa692
MB
1060xfaces.o: xfaces.c dispextern.h frame.h xterm.h buffer.h blockinput.h \
1061 window.h character.h charset.h msdos.h dosfns.h composite.h atimer.h \
3f670e9a 1062 systime.h keyboard.h fontset.h w32term.h nsterm.h coding.h ccl.h \
0a5d24ae 1063 $(INTERVALS_H) termchar.h termhooks.h font.h lisp.h $(config_h)
a0528984
EZ
1064xfns.o: xfns.c buffer.h frame.h window.h keyboard.h xterm.h dispextern.h \
1065 $(srcdir)/../lwlib/lwlib.h blockinput.h atimer.h systime.h epaths.h \
0a5d24ae 1066 character.h charset.h coding.h gtkutil.h lisp.h $(config_h) termhooks.h \
3f670e9a 1067 fontset.h termchar.h font.h xsettings.h $(INTERVALS_H) ccl.h
7de94409 1068xfont.o: dispextern.h xterm.h frame.h blockinput.h character.h charset.h \
3f670e9a 1069 font.h lisp.h $(config_h) atimer.h systime.h fontset.h ccl.h
7de94409 1070xftfont.o: dispextern.h xterm.h frame.h blockinput.h character.h charset.h \
3f670e9a 1071 font.h lisp.h $(config_h) atimer.h systime.h fontset.h ccl.h ftfont.h
7de94409 1072ftxfont.o: dispextern.h xterm.h frame.h blockinput.h character.h charset.h \
3f670e9a 1073 font.h lisp.h $(config_h) atimer.h systime.h fontset.h ccl.h
71015b45 1074menu.o: menu.c lisp.h keyboard.h keymap.h frame.h termhooks.h blockinput.h \
e7c9048f 1075 dispextern.h $(srcdir)/../lwlib/lwlib.h xterm.h gtkutil.h menu.h \
3f670e9a 1076 lisp.h $(config_h) systime.h coding.h composite.h window.h atimer.h
c2d0b18a 1077xmenu.o: xmenu.c xterm.h termhooks.h window.h dispextern.h frame.h buffer.h \
85969c22 1078 charset.h keyboard.h $(srcdir)/../lwlib/lwlib.h blockinput.h atimer.h \
3f670e9a
EZ
1079 systime.h gtkutil.h msdos.h coding.h menu.h lisp.h $(config_h) composite.h \
1080 keymap.h sysselect.h
c2d0b18a 1081xterm.o: xterm.c xterm.h termhooks.h termopts.h termchar.h window.h buffer.h \
85969c22 1082 dispextern.h frame.h disptab.h blockinput.h atimer.h systime.h syssignal.h \
73f838ad 1083 keyboard.h emacs-icon.h character.h charset.h ccl.h fontset.h composite.h \
3f670e9a
EZ
1084 coding.h process.h gtkutil.h font.h fontset.h lisp.h $(config_h) \
1085 xsettings.h intervals.h keymap.h xgselect.h sysselect.h
4524691f 1086xselect.o: xselect.c process.h dispextern.h frame.h xterm.h blockinput.h \
3f670e9a
EZ
1087 buffer.h atimer.h systime.h termhooks.h lisp.h $(config_h) keyboard.h \
1088 coding.h composite.h
1089xgselect.o: xgselect.h systime.h sysselect.h lisp.h $(config_h)
0a5d24ae
DN
1090xrdb.o: xrdb.c lisp.h $(config_h) epaths.h
1091xsmfns.o: xsmfns.c lisp.h $(config_h) systime.h sysselect.h termhooks.h xterm.h \
3f670e9a
EZ
1092 lisp.h termopts.h frame.h dispextern.h
1093xsettings.o: xterm.h xsettings.h lisp.h frame.h termhooks.h $(config_h) \
1094 dispextern.h keyboard.h systime.h coding.h composite.h blockinput.h atimer.h \
1095 termopts.h
a0528984
EZ
1096/* The files of Lisp proper */
1097
3f670e9a
EZ
1098alloc.o: alloc.c process.h frame.h window.h buffer.h puresize.h syssignal.h \
1099 keyboard.h blockinput.h atimer.h systime.h character.h lisp.h $(config_h) \
49105cd0 1100 $(INTERVALS_H) termhooks.h
a63aa692 1101bytecode.o: bytecode.c buffer.h syntax.h character.h window.h dispextern.h \
0a5d24ae 1102 frame.h xterm.h lisp.h $(config_h)
a63aa692 1103data.o: data.c buffer.h puresize.h character.h syssignal.h keyboard.h frame.h \
3f670e9a
EZ
1104 termhooks.h systime.h coding.h composite.h dispextern.h font.h ccl.h \
1105 lisp.h $(config_h)
a0528984 1106eval.o: eval.c commands.h keyboard.h blockinput.h atimer.h systime.h \
3f670e9a 1107 dispextern.h lisp.h $(config_h) coding.h composite.h xterm.h
0a5d24ae
DN
1108floatfns.o: floatfns.c syssignal.h lisp.h $(config_h)
1109fns.o: fns.c commands.h lisp.h $(config_h) frame.h buffer.h character.h keyboard.h \
3f670e9a
EZ
1110 keymap.h window.h dispextern.h $(INTERVALS_H) coding.h md5.h \
1111 blockinput.h atimer.h systime.h xterm.h
85969c22 1112print.o: print.c process.h frame.h window.h buffer.h keyboard.h character.h \
3f670e9a
EZ
1113 lisp.h $(config_h) termchar.h $(INTERVALS_H) msdos.h termhooks.h \
1114 blockinput.h atimer.h systime.h font.h charset.h coding.h ccl.h
85969c22 1115lread.o: lread.c commands.h keyboard.h buffer.h epaths.h character.h \
3f670e9a
EZ
1116 charset.h lisp.h $(config_h) $(INTERVALS_H) termhooks.h coding.h msdos.h \
1117 systime.h frame.h blockinput.h atimer.h
a0528984
EZ
1118
1119/* Text properties support */
3f670e9a 1120composite.o: composite.c buffer.h character.h coding.h font.h ccl.h \
0a5d24ae 1121 frame.h termhooks.h $(INTERVALS_H) window.h lisp.h $(config_h)
bd7bbf29 1122intervals.o: intervals.c buffer.h $(INTERVALS_H) keyboard.h puresize.h \
3f670e9a
EZ
1123 keymap.h lisp.h $(config_h) systime.h coding.h
1124textprop.o: textprop.c buffer.h window.h $(INTERVALS_H) \
0a5d24ae 1125 lisp.h $(config_h)
a0528984 1126
a53cfbe5
JD
1127#endif /* ! AUTO_DEPEND */
1128
a0528984 1129/* System-specific programs to be made.
005bd5a2 1130 OTHER_FILES
a0528984
EZ
1131 select which of these should be compiled. */
1132
edfda783 1133#ifdef HAVE_NS
b330336c
AR
1134/* In fact, every .o file depends directly or indirectly on dispextern.h
1135 and hence nsgui.h under NS. But the ones that actually use stuff there
1136 are more limited. */
1137dispnew.o font.o fontset.o frame.o fringe.o image.o keyboard.o menu.o \
1138 window.o xdisp.o xfaces.o: nsgui.h
edfda783 1139
06b62770
AR
1140${ns_appdir}: ${ns_appsrc}
1141 rm -fr ${ns_appdir}
1142 mkdir -p ${ns_appdir}
1143 ( cd ${ns_appsrc} ; tar cfh - . ) | ( cd ${ns_appdir} ; tar xf - )
e5e2baab 1144 ( cd ${ns_appdir} ; for subdir in `find . -type d ! -name CVS -print` ; do \
06b62770
AR
1145 chmod a+rx $${subdir} ; \
1146 rm -rf $${subdir}/CVS ; \
1147 rm -f $${subdir}/.cvsignore ; done ; )
edfda783 1148
06b62770
AR
1149${ns_appbindir}Emacs: emacs${EXEEXT}
1150 mkdir -p ${ns_appbindir}
1151 cp -f emacs${EXEEXT} ${ns_appbindir}Emacs
edfda783 1152
06b62770 1153ns-app: ${ns_appdir} ${ns_appbindir}Emacs
edfda783
AR
1154
1155#endif /* HAVE_NS */
e0f712ba 1156
a0528984 1157mostlyclean:
108c7c97 1158 rm -f temacs${EXEEXT} prefix-args${EXEEXT} core *.core \#* *.o libXMenu11.a liblw.a
a0528984 1159 rm -f ../etc/DOC
b4945b95 1160 rm -f bootstrap-emacs${EXEEXT} emacs-${version}${EXEEXT}
878bde49 1161 rm -f buildobj.h
a0528984 1162clean: mostlyclean
03bd3c1f 1163 rm -f emacs-*.*.*${EXEEXT} emacs${EXEEXT}
a53cfbe5 1164 -rm -rf deps
5c976973
AR
1165#ifdef HAVE_NS
1166 rm -fr ${ns_appdir}
5c976973 1167#endif
49f6eb95
SM
1168/* bootstrap-clean is used to clean up just before a bootstrap.
1169 It should remove all files generated during a compilation/bootstrap,
1170 but not things like config.status or TAGS. */
fd13748d
AS
1171bootstrap-clean: clean
1172 rm -f epaths.h config.h Makefile.c config.stamp stamp-oldxmenu ../etc/DOC-*
1173 if test -f ./.gdbinit; then \
1174 mv ./.gdbinit ./.gdbinit.save; \
1175 if test -f "${srcdir}/.gdbinit"; then rm -f ./.gdbinit.save; \
1176 else mv ./.gdbinit.save ./.gdbinit; fi; \
1177 fi
1178/**/# This is used in making a distribution.
1179/**/# Do not use it on development directories!
1180distclean: bootstrap-clean
1181 rm -f Makefile
a0528984
EZ
1182maintainer-clean: distclean
1183 @echo "This command is intended for maintainers to use;"
1184 @echo "it deletes files that may require special tools to rebuild."
1185 rm -f TAGS
1186versionclean:
03bd3c1f 1187 -rm -f emacs${EXEEXT} emacs-*.*.*${EXEEXT} ../etc/DOC*
a0528984
EZ
1188extraclean: distclean
1189 -rm -f *~ \#* m/?*~ s/?*~
1190
a0528984
EZ
1191/* Arrange to make a tags table TAGS-LISP for ../lisp,
1192 plus TAGS for the C files, which includes ../lisp/TAGS by reference. */
1193
50da4e56
SM
1194ctagsfiles1 = [xyzXYZ]*.[hcm]
1195ctagsfiles2 = [a-wA-W]*.[hcm]
a0528984
EZ
1196
1197TAGS: $(srcdir)/$(ctagsfiles1) $(srcdir)/$(ctagsfiles2)
1198 ../lib-src/etags --include=TAGS-LISP --include=${lwlibdir}/TAGS \
1199 --regex='/[ ]*DEFVAR_[A-Z_ (]+"\([^"]+\)"/' \
1200 $(srcdir)/$(ctagsfiles1) $(srcdir)/$(ctagsfiles2)
1201frc:
1202TAGS-LISP: frc
99b7e543 1203 $(MAKE) -f ${lispdir}Makefile TAGS-LISP ETAGS=../lib-src/etags
a0528984
EZ
1204
1205$(lwlibdir)TAGS:
1206 (cd $(lwlibdir); $(MAKE) -f $(lwlibdir)Makefile tags ETAGS=../lib-src/etags)
1207
1208tags: TAGS TAGS-LISP $(lwlibdir)TAGS
1209.PHONY: tags
1210
1211
1212/* Bootstrapping. */
fc46d219
SM
1213/* Bootstrapping right is difficult because of the circular dependencies.
1214 Furthermore, we have to deal with the fact that many compilation targets
1215 such as loaddefs.el or *.elc can typically be produced by any old
1216 Emacs executable, so we would like to avoid rebuilding them whenever
1217 we build a new Emacs executable.
1218 To solve the circularity, we use 2 different Emacs executables,
1219 "emacs" is the main target and "bootstrap-emacs" is the one used
1220 to build the *.elc and loaddefs.el files.
b4945b95
SM
1221 To solve the freshness issue, we used to use a third file "witness-emacs"
1222 which was used to witness the fact that there is a bootstrap-emacs
1223 executable, and then have dependencies on witness-emacs rather than
1224 bootstrap-emacs, but that lead to problems in parallel builds (because
1225 witness-emacs needed to be free from dependencies (to avoid rebuilding
1226 it), so it was compiled in parallel, leading typically to having 2
1227 processes dumping bootstrap-emacs at the same time).
1228 So instead, we replace the witness-emacs dependencies by conditional
1229 bootstrap-dependencies (via ${BOOTSTRAPEMACS}). Of course, since we do
1230 not want to rely on GNU Make features, we have to rely on an external
1231 script to do the conditional part of the dependency
1232 (i.e. see the ${SUBDIR} rule ../Makefile.in). */
fc46d219 1233
36565815
GM
1234.SUFFIXES: .elc .el
1235
b4945b95
SM
1236/* These suffix rules do not allow additional dependencies, sadly, so
1237 instead of adding a $(BOOTSTRAPEMACS) dependency here, we add it
1238 separately below.
1239 With GNU Make, we would just say "%.el : %.elc $(BOOTSTRAPEMACS)" */
fc46d219 1240.el.elc:
82c3d67a
AS
1241 @cd ../lisp; $(MAKE) $(MFLAGS) compile-onefile \
1242 THEFILE=$< EMACS=${bootstrap_exe}
fc46d219 1243
b4945b95
SM
1244/* Since the .el.elc rule cannot specify an extra dependency, we do it here. */
1245${lisp} ${SOME_MACHINE_LISP}: $(BOOTSTRAPEMACS)
fc46d219 1246
56f6f760 1247${lispsource}loaddefs.el: $(BOOTSTRAPEMACS)
82c3d67a 1248 cd ../lisp; $(MAKE) $(MFLAGS) autoloads EMACS=${bootstrap_exe}
49f6eb95 1249
c60ee5e7 1250/* Dump an Emacs executable named bootstrap-emacs containing the
a0528984
EZ
1251 files from loadup.el in source form. */
1252
fc46d219 1253bootstrap-emacs${EXEEXT}: temacs${EXEEXT}
b4945b95 1254 cd ../lisp; $(MAKE) $(MFLAGS) update-subdirs
a0528984 1255#ifdef CANNOT_DUMP
11d8ec4a 1256 ln -f temacs${EXEEXT} bootstrap-emacs${EXEEXT}
a0528984 1257#else
83f1cb94 1258 $(RUN_TEMACS) --batch --load loadup bootstrap
108c7c97 1259 mv -f emacs${EXEEXT} bootstrap-emacs${EXEEXT}
a0528984 1260#endif /* ! defined (CANNOT_DUMP) */
768efd84 1261 @: Compile some files earlier to speed up further compilation.
82c3d67a 1262 cd ../lisp; $(MAKE) $(MFLAGS) compile-first EMACS=${bootstrap_exe}
a53cfbe5
JD
1263
1264#ifdef AUTO_DEPEND
1265ALLOBJS=$(STARTFILES) ${obj} ${otherobj} prefix-args.o
1266-include $(ALLOBJS:%.o=deps/%.d)
1267#endif