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