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