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