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