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