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