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