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