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