]> code.delx.au - gnu-emacs/blob - src/Makefile.in
merge from trunk
[gnu-emacs] / src / Makefile.in
1
2 # Makefile for GNU Emacs.
3 # Copyright (C) 1985, 1987, 1988, 1993, 1994, 1995, 1999, 2000, 2001, 2002,
4 # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
5 # Free Software Foundation, Inc.
6
7 # This file is part of GNU Emacs.
8
9 # GNU Emacs is free software: you can redistribute it and/or modify
10 # it under the terms of the GNU General Public License as published by
11 # the Free Software Foundation, either version 3 of the License, or
12 # (at your option) any later version.
13
14 # GNU Emacs is distributed in the hope that it will be useful,
15 # but WITHOUT ANY WARRANTY; without even the implied warranty of
16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 # GNU General Public License for more details.
18
19 # You should have received a copy of the GNU General Public License
20 # along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
21
22
23 # Note that this file is edited by msdos/sed1v2.inp for MSDOS. That
24 # script may need modifying in sync with changes made here. Try to
25 # avoid shell-ism because the DOS build has to use the DOS shell.
26
27 SHELL = /bin/sh
28
29 # Here are the things that we expect ../configure to edit.
30 # We use $(srcdir) explicitly in dependencies so as not to depend on VPATH.
31 srcdir = @srcdir@
32 abs_builddir = @abs_builddir@
33 VPATH = $(srcdir)
34 CC = @CC@
35 CFLAGS = @CFLAGS@
36 CPPFLAGS = @CPPFLAGS@
37 LDFLAGS = @LDFLAGS@
38 EXEEXT = @EXEEXT@
39 version = @version@
40 # Substitute an assignment for the MAKE variable, because
41 # BSD doesn't have it as a default.
42 @SET_MAKE@
43 # Don't use LIBS. configure puts stuff in it that either shouldn't be
44 # linked with Emacs or is duplicated by the other stuff below.
45 # LIBS = @LIBS@
46 LIBOBJS = @LIBOBJS@
47
48 lispsource = ${srcdir}/../lisp/
49 libsrc = ../lib-src/
50 etc = ../etc/
51 oldXMenudir = ../oldXMenu/
52 lwlibdir = ../lwlib/
53 lispdir = ../lisp/
54
55 # Configuration files for .o files to depend on.
56 M_FILE = ${srcdir}/@machfile@
57 S_FILE = ${srcdir}/@opsysfile@
58 config_h = config.h $(M_FILE) $(S_FILE)
59
60 bootstrap_exe = ${abs_builddir}/bootstrap-emacs${EXEEXT}
61
62 ## ns-app if HAVE_NS, else empty.
63 OTHER_FILES = @OTHER_FILES@
64
65 CRT_DIR=@CRT_DIR@
66
67 ## Flags to pass for profiling builds
68 PROFILING_CFLAGS = @PROFILING_CFLAGS@
69 PROFILING_LDFLAGS = @PROFILING_LDFLAGS@
70
71 ## Flags to pass to the compiler to enable build warnings
72 C_WARNINGS_SWITCH = @C_WARNINGS_SWITCH@
73
74 ## Machine-specific CFLAGS.
75 C_SWITCH_MACHINE=@C_SWITCH_MACHINE@
76 ## System-specific CFLAGS.
77 C_SWITCH_SYSTEM=@C_SWITCH_SYSTEM@
78
79 ## Currently only set if NS_IMPL_GNUSTEP.
80 ## C_SWITCH_X_SITE may override this.
81 C_SWITCH_X_SYSTEM=@C_SWITCH_X_SYSTEM@
82
83 ## Define C_SWITCH_X_SITE to contain any special flags your compiler
84 ## may need to deal with X Windows. For instance, if you've defined
85 ## HAVE_X_WINDOWS and your X include files aren't in a place that your
86 ## compiler can find on its own, you might want to add "-I/..." or
87 ## something similar. This is normally set by configure.
88 ## This is used before C_SWITCH_X_SYSTEM and may override it.
89 C_SWITCH_X_SITE=@C_SWITCH_X_SITE@
90
91 ## Define LD_SWITCH_X_SITE to contain any special flags your loader
92 ## may need to deal with X Windows. For instance, if your X libraries
93 ## aren't in a place that your loader can find on its own, you might
94 ## want to add "-L/..." or something similar. Only used if
95 ## HAVE_X_WINDOWS.
96 ## FIXME? configure sets a value for this, but it has never been
97 ## substituted in this or any other Makefile. Cf C_SWITCH_X_SITE.
98 LD_SWITCH_X_SITE=
99
100 ## Next two must come before LD_SWITCH_SYSTEM.
101 ## If needed, a -R option that says where to find X windows at run time.
102 LD_SWITCH_X_SITE_AUX=@LD_SWITCH_X_SITE_AUX@
103 ## As above, but using -rpath instead.
104 LD_SWITCH_X_SITE_AUX_RPATH=@LD_SWITCH_X_SITE_AUX_RPATH@
105
106 ## System-specific LDFLAGS.
107 LD_SWITCH_SYSTEM=@LD_SWITCH_SYSTEM@
108
109 ## This holds any special options for linking temacs only (ie, not
110 ## used by configure). Not used elsewhere because it sometimes
111 ## contains options that have to do with using Emacs's crt0,
112 ## which are only good with temacs.
113 LD_SWITCH_SYSTEM_TEMACS=@LD_SWITCH_SYSTEM_TEMACS@
114
115 ## Flags to pass to ld only for temacs.
116 TEMACS_LDFLAGS = $(LD_SWITCH_SYSTEM) $(LD_SWITCH_SYSTEM_TEMACS)
117
118 ## $LDFLAGS $PROFILING_LDFLAGS, or empty if NS_IMPL_GNUSTEP (for some reason).
119 TEMACS_LDFLAGS2 = @TEMACS_LDFLAGS2@
120
121 ## Some systems define this to request special libraries.
122 LIBS_SYSTEM=@LIBS_SYSTEM@
123
124 ## Where to find libgcc.a, if using gcc and necessary.
125 LIB_GCC=@LIB_GCC@
126
127 LD=@LINKER@
128
129 ## May use $CRT_DIR.
130 LIB_STANDARD=@LIB_STANDARD@
131
132 ## -lm, or empty.
133 LIB_MATH=@LIB_MATH@
134
135 LIBTIFF=@LIBTIFF@
136 LIBJPEG=@LIBJPEG@
137 LIBPNG=@LIBPNG@
138 LIBGIF=@LIBGIF@
139 LIBXPM=@LIBXPM@
140 XFT_LIBS=@XFT_LIBS@
141 LIBX_EXTRA=$(LIBTIFF) $(LIBJPEG) $(LIBPNG) $(LIBGIF) $(LIBXPM) -lX11 $(XFT_LIBS)
142
143 FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@
144 FONTCONFIG_LIBS = @FONTCONFIG_LIBS@
145 FREETYPE_CFLAGS = @FREETYPE_CFLAGS@
146 FREETYPE_LIBS = @FREETYPE_LIBS@
147 LIBOTF_CFLAGS = @LIBOTF_CFLAGS@
148 LIBOTF_LIBS = @LIBOTF_LIBS@
149 M17N_FLT_CFLAGS = @M17N_FLT_CFLAGS@
150 M17N_FLT_LIBS = @M17N_FLT_LIBS@
151
152 DBUS_CFLAGS = @DBUS_CFLAGS@
153 DBUS_LIBS = @DBUS_LIBS@
154 DBUS_OBJ = @DBUS_OBJ@
155
156 GCONF_CFLAGS = @GCONF_CFLAGS@
157 GCONF_LIBS = @GCONF_LIBS@
158
159 GTK_OBJ=@GTK_OBJ@
160
161 ## -ltermcap, or -lncurses, or -lcurses, or "".
162 LIBS_TERMCAP=@LIBS_TERMCAP@
163 ## terminfo.o if TERMINFO, else tparam.o.
164 TERMCAP_OBJ=@TERMCAP_OBJ@
165
166 LIBXMU=@LIBXMU@
167
168 LIBXSM=@LIBXSM@
169
170 LIBXTR6=@LIBXTR6@
171
172 ## $(LIBXMU) -lXt $(LIBXTR6) -lXext if USE_X_TOOLKIT, else $(LIBXSM).
173 ## Only used if HAVE_X_WINDOWS.
174 LIBXT_OTHER=@LIBXT_OTHER@
175
176 ## If !HAVE_X11 || USE_GTK, empty.
177 ## Else if USE_X_TOOLKIT really-lwlib, else really-oldxmenu.
178 OLDXMENU_TARGET=@OLDXMENU_TARGET@
179
180 ## If !HAVE_X11 || USE_GTK, empty.
181 ## Else if USE_X_TOOLKIT, ${lwlibdir}liblw.a.
182 ## Else ${oldXMenudir}libXMenu11.a.
183 ## (Actually, rather than being empty, it is set to "nothing".
184 ## It is never actually used for anything in this case.
185 ## This is done because there is a rule with target $(OLDXMENU) below,
186 ## and I think it might be a syntax error with some makes to have
187 ## an empty target, even if the associated rule is never run.
188 ## http://lists.gnu.org/archive/html/help-make/2010-05/msg00058.html
189 ## The alternative would be to put that rule in a makefile fragment.)
190 OLDXMENU=@OLDXMENU@
191
192 ## If HAVE_X11 && !USE_GTK, ${OLDXMENU} ../src/${OLDXMENU}; else empty.
193 ## We use stamp-xmenu with these two deps to both ensure that lwlib
194 ## gets remade based on its dependencies in its own makefile,
195 ## and remake temacs if lwlib gets changed by this.
196 OLDXMENU_DEPS=@OLDXMENU_DEPS@
197
198 ## If !HAVE_X11 && HAVE_X_WINDOWS, -lXMenu (this case no longer possible).
199 ## Else if !HAVE_X11 || USE_GTK, empty.
200 ## Else $(OLDXMENU).
201 LIBXMENU=@LIBXMENU@
202
203 XMENU_OBJ=@XMENU_OBJ@
204 XOBJ=@XOBJ@
205
206 TOOLKIT_LIBW=@TOOLKIT_LIBW@
207
208 ## Only used if HAVE_X11, in LIBX_OTHER.
209 LIBXT=$(TOOLKIT_LIBW) $(LIBXT_OTHER)
210
211 ## If HAVE_X11, $(LIBXT) $(LIBX_EXTRA), else empty.
212 LIBX_OTHER=@LIBX_OTHER@
213
214 ## LIBXMENU is nil if !HAVE_X_WINDOWS.
215 ## LD_SWITCH_X_SITE should not be used if not using X, but nothing
216 ## sets it at present, and if something ever does, it should be
217 ## configure, which should set it to nil in non-X builds.
218 LIBX_BASE=$(LIBXMENU) $(LD_SWITCH_X_SITE)
219
220 LIBSOUND= @LIBSOUND@
221 CFLAGS_SOUND= @CFLAGS_SOUND@
222
223 RSVG_LIBS= @RSVG_LIBS@
224 RSVG_CFLAGS= @RSVG_CFLAGS@
225
226 IMAGEMAGICK_LIBS= @IMAGEMAGICK_LIBS@
227 IMAGEMAGICK_CFLAGS= @IMAGEMAGICK_CFLAGS@
228
229
230 ## widget.o if USE_X_TOOLKIT, otherwise empty.
231 WIDGET_OBJ=@WIDGET_OBJ@
232
233 ## sheap.o if CYGWIN, otherwise empty.
234 CYGWIN_OBJ=@CYGWIN_OBJ@
235
236 ## dosfns.o msdos.o w16select.o if MSDOS.
237 MSDOS_OBJ =
238 ## w16select.o termcap.o if MSDOS && HAVE_X_WINDOWS.
239 MSDOS_X_OBJ =
240 MSDOS_SUPPORT_REAL = ${lispsource}ls-lisp.elc ${lispsource}disp-table.elc \
241 ${lispsource}dos-fns.elc ${lispsource}dos-w32.elc ${lispsource}dos-vars.elc \
242 ${lispsource}term/internal.elc ${lispsource}term/pc-win.elc
243 ## $MSDOS_SUPPORT_REAL if MSDOS.
244 MSDOS_SUPPORT =
245
246 ns_appdir=@ns_appdir@
247 ns_appbindir=@ns_appbindir@
248 ns_appsrc=@ns_appsrc@
249 NS_OBJ=@NS_OBJ@
250 NS_SUPPORT=@NS_SUPPORT@
251 ## Only set if NS_IMPL_GNUSTEP.
252 GNU_OBJC_CFLAGS=@GNU_OBJC_CFLAGS@
253
254 ## Empty if !HAVE_X_WINDOWS
255 ## xfont.o ftfont.o xftfont.o ftxfont.o if HAVE_XFT
256 ## xfont.o ftfont.o ftxfont.o if HAVE_FREETYPE
257 ## else xfont.o
258 FONT_OBJ=@FONT_OBJ@
259
260 ## Used if HAVE_MOUSE.
261 REAL_MOUSE_SUPPORT=${lispsource}mouse.elc ${lispsource}select.elc \
262 ${lispsource}scroll-bar.elc
263 ## Used if HAVE_GPM && !HAVE_MOUSE
264 GPM_MOUSE_SUPPORT=${lispsource}mouse.elc
265 LIBGPM = @LIBGPM@
266 ## Either of the two preceding options, or empty.
267 MOUSE_SUPPORT=@MOUSE_SUPPORT@
268
269 ## ${lispsource}tooltip.elc if HAVE_WINDOW_SYSTEM, else empty.
270 TOOLTIP_SUPPORT=@TOOLTIP_SUPPORT@
271
272 BASE_WINDOW_SUPPORT=${lispsource}fringe.elc ${lispsource}image.elc \
273 ${lispsource}international/fontset.elc ${lispsource}dnd.elc \
274 ${lispsource}tool-bar.elc ${lispsource}mwheel.elc
275
276 X_WINDOW_SUPPORT=${lispsource}x-dnd.elc ${lispsource}term/common-win.elc \
277 ${lispsource}term/x-win.elc ${lispsource}dynamic-setting.elc
278
279 ## If HAVE_X_WINDOWS, both the above
280 ## else if HAVE_WINDOW_SYSTEM (ie, HAVE_NS) just the former; else empty.
281 WINDOW_SUPPORT=@WINDOW_SUPPORT@
282
283 ## -lresolv, or empty.
284 LIBRESOLV = @LIBRESOLV@
285
286 LIBSELINUX_LIBS = @LIBSELINUX_LIBS@
287
288 INTERVALS_H = dispextern.h intervals.h composite.h
289
290 GETLOADAVG_LIBS = @GETLOADAVG_LIBS@
291
292 RUN_TEMACS = `/bin/pwd`/temacs
293
294 START_FILES = @START_FILES@
295
296 UNEXEC_OBJ = @UNEXEC_OBJ@
297
298 CANNOT_DUMP=@CANNOT_DUMP@
299
300 DEPDIR=deps
301 ## -MMD -MF ${DEPDIR}/$*.d if AUTO_DEPEND; else empty.
302 DEPFLAGS=@DEPFLAGS@
303 ## test -d ${DEPDIR} || mkdir ${DEPDIR} (if AUTO_DEPEND); else ':'.
304 MKDEPDIR=@MKDEPDIR@
305
306 ## DO NOT use -R. There is a special hack described in lastfile.c
307 ## which is used instead. Some initialized data areas are modified
308 ## at initial startup, then labeled as part of the text area when
309 ## Emacs is dumped for the first time, and never changed again.
310 ##
311 ## -Demacs is needed to make some files produce the correct version
312 ## for use in Emacs.
313 ##
314 ## -DHAVE_CONFIG_H is needed for some other files to take advantage of
315 ## the information in `config.h'.
316 ##
317 ## C_SWITCH_X_SITE must come before C_SWITCH_X_SYSTEM
318 ## since it may have -I options that should override those.
319 ##
320 ## FIXME? MYCPPFLAGS only referenced in etc/DEBUG.
321 ALL_CFLAGS=-Demacs -DHAVE_CONFIG_H $(MYCPPFLAGS) -I. -I${srcdir} \
322 ${C_SWITCH_MACHINE} ${C_SWITCH_SYSTEM} ${C_SWITCH_X_SITE} \
323 ${C_SWITCH_X_SYSTEM} ${CFLAGS_SOUND} ${RSVG_CFLAGS} ${IMAGEMAGICK_CFLAGS} ${DBUS_CFLAGS} \
324 ${GCONF_CFLAGS} ${FREETYPE_CFLAGS} ${FONTCONFIG_CFLAGS} \
325 ${LIBOTF_CFLAGS} ${M17N_FLT_CFLAGS} ${DEPFLAGS} ${PROFILING_CFLAGS} \
326 ${C_WARNINGS_SWITCH} ${CFLAGS}
327 ALL_OBJC_CFLAGS=$(ALL_CFLAGS) $(GNU_OBJC_CFLAGS)
328
329 .SUFFIXES: .m
330 .c.o:
331 @$(MKDEPDIR)
332 $(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) $<
333 .m.o:
334 @$(MKDEPDIR)
335 $(CC) -c $(CPPFLAGS) $(ALL_OBJC_CFLAGS) $<
336
337
338 ## lastfile must follow all files whose initialized data areas should
339 ## be dumped as pure by dump-emacs.
340 obj= dispnew.o frame.o scroll.o xdisp.o menu.o $(XMENU_OBJ) window.o \
341 charset.o coding.o category.o ccl.o character.o chartab.o bidi.o \
342 cm.o term.o terminal.o xfaces.o $(XOBJ) $(GTK_OBJ) $(DBUS_OBJ) \
343 emacs.o keyboard.o macros.o keymap.o sysdep.o \
344 buffer.o filelock.o insdel.o marker.o \
345 minibuf.o fileio.o dired.o filemode.o \
346 cmds.o casetab.o casefiddle.o indent.o search.o regex.o undo.o \
347 alloc.o data.o doc.o editfns.o callint.o \
348 eval.o floatfns.o fns.o font.o print.o lread.o \
349 syntax.o $(UNEXEC_OBJ) bytecode.o \
350 process.o callproc.o \
351 region-cache.o sound.o atimer.o \
352 doprnt.o strftime.o intervals.o textprop.o composite.o md5.o \
353 $(MSDOS_OBJ) $(MSDOS_X_OBJ) $(NS_OBJ) $(CYGWIN_OBJ) $(FONT_OBJ)
354
355 ## Object files used on some machine or other.
356 ## These go in the DOC file on all machines in case they are needed.
357 SOME_MACHINE_OBJECTS = dosfns.o msdos.o \
358 xterm.o xfns.o xmenu.o xselect.o xrdb.o xsmfns.o fringe.o image.o \
359 fontset.o dbusbind.o \
360 nsterm.o nsfns.o nsmenu.o nsselect.o nsimage.o nsfont.o \
361 w32.o w32console.o w32fns.o w32heap.o w32inevt.o \
362 w32menu.o w32proc.o w32reg.o w32select.o w32term.o w32xfns.o $(FONT_OBJ)
363
364 ## gmalloc.o if !SYSTEM_MALLOC && !DOUG_LEA_MALLOC, else empty.
365 GMALLOC_OBJ=@GMALLOC_OBJ@
366
367 ## vm-limit.o if !SYSTEM_MALLOC, else empty.
368 VMLIMIT_OBJ=@VMLIMIT_OBJ@
369
370 ## ralloc.o if !SYSTEM_MALLOC && REL_ALLOC, else empty.
371 RALLOC_OBJ=@RALLOC_OBJ@
372
373 ## Empty on Cygwin, lastfile.o elsewhere.
374 PRE_ALLOC_OBJ=@PRE_ALLOC_OBJ@
375 ## lastfile.o on Cygwin, empty elsewhere.
376 POST_ALLOC_OBJ=@POST_ALLOC_OBJ@
377
378 ## List of object files that make-docfile should not be told about.
379 otherobj= $(TERMCAP_OBJ) $(PRE_ALLOC_OBJ) $(GMALLOC_OBJ) $(RALLOC_OBJ) \
380 $(POST_ALLOC_OBJ) $(VMLIMIT_OBJ) $(WIDGET_OBJ) $(LIBOBJS)
381
382 ## This is the platform-specific list of Lisp files loaded into the
383 ## dumped Emacs. It is arranged like this because it is easier to generate
384 ## it semi-mechanically from loadup.el this way.
385 ##
386 ## Note that this list should not include lisp files which might not
387 ## be present, like site-load.el and site-init.el; this makefile
388 ## expects them all to be either present or buildable.
389 ##
390 ## Files which are loaded unconditionally (i.e., on all platforms) should
391 ## also be in shortlisp. Files which are loaded conditionally (i.e., only
392 ## on some platforms) should instead be in SOME_MACHINE_LISP.
393 ##
394 ## Place loaddefs.el first, so it gets generated first, since it is on
395 ## the critical path (relevant in parallel compilations).
396 lisp= \
397 ${lispsource}loaddefs.el \
398 ${lispsource}abbrev.elc \
399 ${lispsource}buff-menu.elc \
400 ${lispsource}button.elc \
401 ${lispsource}emacs-lisp/byte-run.elc \
402 ${lispsource}composite.elc \
403 ${lispsource}cus-face.elc \
404 ${lispsource}cus-start.elc \
405 ${lispsource}custom.elc \
406 ${lispsource}emacs-lisp/backquote.elc \
407 ${lispsource}emacs-lisp/lisp-mode.elc \
408 ${lispsource}emacs-lisp/lisp.elc \
409 ${lispsource}env.elc \
410 ${lispsource}faces.elc \
411 ${lispsource}files.elc \
412 ${lispsource}format.elc \
413 ${lispsource}facemenu.elc \
414 ${MOUSE_SUPPORT} \
415 ${lispsource}emacs-lisp/float-sup.elc \
416 ${lispsource}frame.elc \
417 ${lispsource}help.elc \
418 ${lispsource}indent.elc \
419 ${lispsource}isearch.elc \
420 ${lispsource}rfn-eshadow.elc \
421 ${lispsource}loadup.el \
422 ${lispsource}bindings.elc \
423 ${lispsource}emacs-lisp/map-ynp.elc \
424 ${lispsource}menu-bar.elc \
425 ${lispsource}international/mule.elc \
426 ${lispsource}international/mule-conf.elc \
427 ${lispsource}international/mule-cmds.elc \
428 ${lispsource}international/characters.elc \
429 ${lispsource}international/charprop.el \
430 ${lispsource}case-table.elc \
431 ${lispsource}language/chinese.elc \
432 ${lispsource}language/cyrillic.elc \
433 ${lispsource}language/indian.elc \
434 ${lispsource}language/sinhala.el \
435 ${lispsource}language/english.el \
436 ${lispsource}language/ethiopic.elc \
437 ${lispsource}language/european.elc \
438 ${lispsource}language/czech.el \
439 ${lispsource}language/slovak.el \
440 ${lispsource}language/romanian.el \
441 ${lispsource}language/greek.el \
442 ${lispsource}language/hebrew.elc \
443 ${lispsource}language/japanese.el \
444 ${lispsource}language/korean.el \
445 ${lispsource}language/lao.el \
446 ${lispsource}language/cham.el \
447 ${lispsource}language/tai-viet.el \
448 ${lispsource}language/thai.el \
449 ${lispsource}language/tibetan.elc \
450 ${lispsource}language/vietnamese.elc \
451 ${lispsource}language/misc-lang.el \
452 ${lispsource}language/utf-8-lang.el \
453 ${lispsource}language/georgian.el \
454 ${lispsource}language/khmer.el \
455 ${lispsource}language/burmese.el \
456 ${lispsource}paths.el \
457 ${lispsource}register.elc \
458 ${lispsource}replace.elc \
459 ${lispsource}simple.elc \
460 ${lispsource}minibuffer.elc \
461 ${lispsource}startup.elc \
462 ${lispsource}subr.elc \
463 ${lispsource}term/tty-colors.elc \
464 ${lispsource}font-core.elc \
465 ${lispsource}emacs-lisp/syntax.elc \
466 ${lispsource}font-lock.elc \
467 ${lispsource}jit-lock.elc \
468 ${lispsource}textmodes/fill.elc \
469 ${lispsource}textmodes/page.elc \
470 ${lispsource}textmodes/paragraphs.elc \
471 ${lispsource}textmodes/text-mode.elc \
472 ${lispsource}emacs-lisp/timer.elc \
473 ${lispsource}jka-cmpr-hook.elc \
474 ${lispsource}vc/vc-hooks.elc \
475 ${lispsource}vc/ediff-hook.elc \
476 ${lispsource}epa-hook.elc \
477 ${TOOLTIP_SUPPORT} \
478 ${MSDOS_SUPPORT} \
479 ${WINDOW_SUPPORT} \
480 ${NS_SUPPORT} \
481 ${lispsource}widget.elc \
482 ${lispsource}window.elc \
483 ${lispsource}version.el
484
485 ## List of relative names for those files from $lisp that are loaded
486 ## unconditionally (i.e. on all platforms). Files from $lisp that
487 ## are only loaded on some platforms should instead be placed in
488 ## SOME_MACHINE_LISP. The only reason this variable exists is to prevent
489 ## the make-docfile command-line getting too long for some systems.
490 shortlisp= \
491 ../lisp/loaddefs.el \
492 ../lisp/abbrev.elc \
493 ../lisp/buff-menu.elc \
494 ../lisp/button.elc \
495 ../lisp/emacs-lisp/byte-run.elc \
496 ../lisp/composite.elc \
497 ../lisp/cus-face.elc \
498 ../lisp/cus-start.elc \
499 ../lisp/custom.elc \
500 ../lisp/emacs-lisp/backquote.elc \
501 ../lisp/emacs-lisp/lisp-mode.elc \
502 ../lisp/emacs-lisp/lisp.elc \
503 ../lisp/facemenu.elc \
504 ../lisp/faces.elc \
505 ../lisp/files.elc \
506 ../lisp/emacs-lisp/float-sup.elc \
507 ../lisp/format.elc \
508 ../lisp/frame.elc \
509 ../lisp/help.elc \
510 ../lisp/indent.elc \
511 ../lisp/isearch.elc \
512 ../lisp/rfn-eshadow.elc \
513 ../lisp/loadup.el \
514 ../lisp/bindings.elc \
515 ../lisp/emacs-lisp/map-ynp.elc \
516 ../lisp/env.elc \
517 ../lisp/international/mule.elc \
518 ../lisp/international/mule-conf.elc \
519 ../lisp/international/mule-cmds.elc \
520 ../lisp/international/characters.elc \
521 ../lisp/case-table.elc \
522 ../lisp/language/chinese.elc \
523 ../lisp/language/cyrillic.elc \
524 ../lisp/language/indian.elc \
525 ../lisp/language/sinhala.el \
526 ../lisp/language/english.el \
527 ../lisp/language/ethiopic.elc \
528 ../lisp/language/european.elc \
529 ../lisp/language/czech.el \
530 ../lisp/language/slovak.el \
531 ../lisp/language/romanian.el \
532 ../lisp/language/greek.el \
533 ../lisp/language/hebrew.elc \
534 ../lisp/language/japanese.el \
535 ../lisp/language/korean.el \
536 ../lisp/language/lao.el \
537 ../lisp/language/cham.el \
538 ../lisp/language/tai-viet.el \
539 ../lisp/language/thai.el \
540 ../lisp/language/tibetan.elc \
541 ../lisp/language/vietnamese.elc \
542 ../lisp/language/misc-lang.el \
543 ../lisp/language/utf-8-lang.el \
544 ../lisp/language/georgian.el \
545 ../lisp/language/khmer.el \
546 ../lisp/language/burmese.el \
547 ../lisp/menu-bar.elc \
548 ../lisp/paths.el \
549 ../lisp/register.elc \
550 ../lisp/replace.elc \
551 ../lisp/simple.elc \
552 ../lisp/minibuffer.elc \
553 ../lisp/startup.elc \
554 ../lisp/subr.elc \
555 ../lisp/term/tty-colors.elc \
556 ../lisp/font-core.elc \
557 ../lisp/emacs-lisp/syntax.elc \
558 ../lisp/font-lock.elc \
559 ../lisp/jit-lock.elc \
560 ../lisp/textmodes/fill.elc \
561 ../lisp/textmodes/page.elc \
562 ../lisp/textmodes/paragraphs.elc \
563 ../lisp/textmodes/text-mode.elc \
564 ../lisp/emacs-lisp/timer.elc \
565 ../lisp/vc/vc-hooks.elc \
566 ../lisp/vc/ediff-hook.elc \
567 ../lisp/jka-cmpr-hook.elc \
568 ../lisp/epa-hook.elc \
569 ../lisp/widget.elc \
570 ../lisp/window.elc \
571 ../lisp/version.el
572
573 ## Like $shortlisp, but includes only those files from $lisp that are loaded
574 ## conditionally (i.e., only on some platforms).
575 SOME_MACHINE_LISP = ../lisp/mouse.elc \
576 ../lisp/select.elc ../lisp/scroll-bar.elc \
577 ../lisp/ls-lisp.elc ../lisp/dos-fns.elc \
578 ../lisp/w32-fns.elc ../lisp/dos-w32.elc \
579 ../lisp/disp-table.elc ../lisp/dos-vars.elc \
580 ../lisp/tooltip.elc ../lisp/image.elc \
581 ../lisp/fringe.elc ../lisp/dnd.elc \
582 ../lisp/mwheel.elc ../lisp/tool-bar.elc \
583 ../lisp/x-dnd.elc ../lisp/dynamic-setting.elc \
584 ../lisp/international/ccl.elc \
585 ../lisp/international/fontset.elc \
586 ../lisp/mouse.elc \
587 ../lisp/term/common-win.elc \
588 ../lisp/term/x-win.elc \
589 ../lisp/term/pc-win.elc ../lisp/term/internal.elc \
590 ../lisp/term/ns-win.elc ../lisp/term/w32-win.elc \
591 ../lisp/emacs-lisp/easymenu.elc
592
593 ## Construct full set of libraries to be linked.
594 ## Note that SunOS needs -lm to come before -lc; otherwise, you get
595 ## duplicated symbols. If the standard libraries were compiled
596 ## with GCC, we might need LIB_GCC again after them.
597 LIBES = $(LIBS) $(LIBX_BASE) $(LIBX_OTHER) $(LIBSOUND) \
598 $(RSVG_LIBS) ${IMAGEMAGICK_LIBS} $(DBUS_LIBS) $(LIBGPM) $(LIBRESOLV) $(LIBS_SYSTEM) \
599 $(LIBS_TERMCAP) $(GETLOADAVG_LIBS) ${GCONF_LIBS} ${LIBSELINUX_LIBS} \
600 $(FREETYPE_LIBS) $(FONTCONFIG_LIBS) $(LIBOTF_LIBS) $(M17N_FLT_LIBS) \
601 $(LIB_GCC) $(LIB_MATH) $(LIB_STANDARD) $(LIB_GCC)
602
603 all: emacs${EXEEXT} $(OTHER_FILES)
604
605 ## Does anyone ever pay attention to the load-path-shadows output here?
606 ## The dumped Emacs is as functional and more efficient than
607 ## bootstrap-emacs, so we replace the latter with the former.
608 emacs${EXEEXT}: temacs${EXEEXT} ${etc}DOC ${lisp}
609 if test "${CANNOT_DUMP}" = "yes"; then \
610 ln -f temacs${EXEEXT} emacs${EXEEXT}; \
611 EMACSLOADPATH=${lispsource} ./emacs -q -batch \
612 -f list-load-path-shadows || true; \
613 else \
614 LC_ALL=C $(RUN_TEMACS) -batch -l loadup dump || exit 1; \
615 ln -f emacs${EXEEXT} bootstrap-emacs${EXEEXT}; \
616 ./emacs -q -batch -f list-load-path-shadows || true; \
617 fi
618
619 ## We run make-docfile twice because the command line may get too long
620 ## on some systems.
621 ## ${SOME_MACHINE_OBJECTS} comes before ${obj} because some files may
622 ## or may not be included in ${obj}, but they are always included in
623 ## ${SOME_MACHINE_OBJECTS}. Since a file is processed when it is mentioned
624 ## for the first time, this prevents any variation between configurations
625 ## in the contents of the DOC file.
626 ## Likewise for ${SOME_MACHINE_LISP}.
627 ## Most of this Makefile refers to Lisp files via ${lispsource}, so
628 ## we also use ${lisp} rather than ${shortlisp} for the dependency since
629 ## the Makefile uses string equality to decide when we talk about identical
630 ## files. Apparently we pass ${shortlisp} rather than ${lisp} to make-docfile
631 ## only in order to reduce the command line length. --Stef
632 ${etc}DOC: ${libsrc}make-docfile${EXEEXT} ${obj} ${lisp} ${SOME_MACHINE_LISP}
633 -rm -f ${etc}DOC
634 ${libsrc}make-docfile -d ${srcdir} ${SOME_MACHINE_OBJECTS} ${obj} > ${etc}DOC
635 ${libsrc}make-docfile -a ${etc}DOC -d ${srcdir} ${SOME_MACHINE_LISP} ${shortlisp}
636
637 ${libsrc}make-docfile${EXEEXT}:
638 cd ${libsrc}; ${MAKE} ${MFLAGS} make-docfile${EXEEXT}
639
640 buildobj.h: Makefile
641 echo "#define BUILDOBJ \"${obj} ${otherobj} " "\"" > buildobj.h
642
643
644 temacs${EXEEXT}: $(START_FILES) stamp-oldxmenu ${obj} ${otherobj}
645 $(LD) ${TEMACS_LDFLAGS} ${TEMACS_LDFLAGS2} \
646 -o temacs ${START_FILES} ${obj} ${otherobj} ${LIBES}
647
648 ## The following oldxmenu-related rules are only (possibly) used if
649 ## HAVE_X11 && !USE_GTK, but there is no harm in always defining them
650 ## (provided we take a little care that OLDXMENU is never empty).
651 really-lwlib:
652 cd ${lwlibdir}; ${MAKE} ${MFLAGS} \
653 CC='${CC}' CFLAGS='${CFLAGS}' MAKE='${MAKE}'
654 @true # make -t should not create really-lwlib.
655 .PHONY: really-lwlib
656
657 really-oldXMenu:
658 cd ${oldXMenudir}; ${MAKE} ${MFLAGS} \
659 CC='${CC}' CFLAGS='${CFLAGS}' MAKE='${MAKE}'
660 @true # make -t should not create really-oldXMenu.
661 .PHONY: really-oldXMenu
662
663 ## We do not really need this when OLDXMENU_DEPS is empty, but as
664 ## things stand we need something to satisfy the temacs dependency.
665 stamp-oldxmenu: ${OLDXMENU_DEPS}
666 touch stamp-oldxmenu
667
668 ## Supply an ordering for parallel make.
669 ../src/$(OLDXMENU): ${OLDXMENU}
670
671 $(OLDXMENU): $(OLDXMENU_TARGET)
672
673 ../config.status:: epaths.in
674 @echo "The file epaths.h needs to be set up from epaths.in."
675 @echo "Please run the `configure' script again."
676 exit 1
677
678 ../config.status:: config.in
679 @echo "The file config.h needs to be set up from config.in."
680 @echo "Please run the `configure' script again."
681 exit 1
682
683 ecrt0.o: ecrt0.c $(config_h)
684 @$(MKDEPDIR)
685 $(CC) -c $(ALL_CFLAGS) ${srcdir}/ecrt0.c
686 doc.o: buildobj.h
687
688
689 ## If HAVE_NS, some ns-specific rules (for OTHER_FILES) are inserted here.
690 @ns_frag@
691
692
693 mostlyclean:
694 rm -f temacs${EXEEXT} core *.core \#* *.o libXMenu11.a liblw.a
695 rm -f ../etc/DOC
696 rm -f bootstrap-emacs${EXEEXT} emacs-${version}${EXEEXT}
697 rm -f buildobj.h
698 clean: mostlyclean
699 rm -f emacs-*.*.*${EXEEXT} emacs${EXEEXT}
700 -rm -rf ${DEPDIR}
701 test "X${ns_appdir}" = "X" || rm -rf ${ns_appdir}
702
703 ## bootstrap-clean is used to clean up just before a bootstrap.
704 ## It should remove all files generated during a compilation/bootstrap,
705 ## but not things like config.status or TAGS.
706 bootstrap-clean: clean
707 rm -f epaths.h config.h config.stamp stamp-oldxmenu ../etc/DOC-*
708 if test -f ./.gdbinit; then \
709 mv ./.gdbinit ./.gdbinit.save; \
710 if test -f "${srcdir}/.gdbinit"; then rm -f ./.gdbinit.save; \
711 else mv ./.gdbinit.save ./.gdbinit; fi; \
712 fi
713 ## This is used in making a distribution.
714 ## Do not use it on development directories!
715 distclean: bootstrap-clean
716 rm -f Makefile
717 maintainer-clean: distclean
718 @echo "This command is intended for maintainers to use;"
719 @echo "it deletes files that may require special tools to rebuild."
720 rm -f TAGS
721 versionclean:
722 -rm -f emacs${EXEEXT} emacs-*.*.*${EXEEXT} ../etc/DOC*
723 extraclean: distclean
724 -rm -f *~ \#* m/?*~ s/?*~
725
726 ## Arrange to make a tags table TAGS-LISP for ../lisp,
727 ## plus TAGS for the C files, which includes ../lisp/TAGS by reference.
728
729 ctagsfiles1 = [xyzXYZ]*.[hcm]
730 ctagsfiles2 = [a-wA-W]*.[hcm]
731
732 TAGS: $(srcdir)/$(ctagsfiles1) $(srcdir)/$(ctagsfiles2)
733 ../lib-src/etags --include=TAGS-LISP --include=${lwlibdir}/TAGS \
734 --regex='/[ ]*DEFVAR_[A-Z_ (]+"\([^"]+\)"/' \
735 $(srcdir)/$(ctagsfiles1) $(srcdir)/$(ctagsfiles2)
736 frc:
737 TAGS-LISP: frc
738 $(MAKE) -f ${lispdir}Makefile TAGS-LISP ETAGS=../lib-src/etags
739
740 $(lwlibdir)TAGS:
741 (cd $(lwlibdir); $(MAKE) -f $(lwlibdir)Makefile tags ETAGS=../lib-src/etags)
742
743 tags: TAGS TAGS-LISP $(lwlibdir)TAGS
744 .PHONY: tags
745
746
747 ### Bootstrapping.
748
749 ## Bootstrapping right is difficult because of the circular dependencies.
750 ## Furthermore, we have to deal with the fact that many compilation targets
751 ## such as loaddefs.el or *.elc can typically be produced by any old
752 ## Emacs executable, so we would like to avoid rebuilding them whenever
753 ## we build a new Emacs executable.
754 ## To solve the circularity, we use 2 different Emacs executables,
755 ## "emacs" is the main target and "bootstrap-emacs" is the one used
756 ## to build the *.elc and loaddefs.el files.
757 ## To solve the freshness issue, we used to use a third file "witness-emacs"
758 ## which was used to witness the fact that there is a bootstrap-emacs
759 ## executable, and then have dependencies on witness-emacs rather than
760 ## bootstrap-emacs, but that lead to problems in parallel builds (because
761 ## witness-emacs needed to be free from dependencies (to avoid rebuilding
762 ## it), so it was compiled in parallel, leading typically to having 2
763 ## processes dumping bootstrap-emacs at the same time).
764 ## So instead, we replace the witness-emacs dependencies by conditional
765 ## bootstrap-dependencies (via ${BOOTSTRAPEMACS}). Of course, since we do
766 ## not want to rely on GNU Make features, we have to rely on an external
767 ## script to do the conditional part of the dependency
768 ## (i.e. see the ${SUBDIR} rule ../Makefile.in).
769
770 .SUFFIXES: .elc .el
771
772 ## These suffix rules do not allow additional dependencies, sadly, so
773 ## instead of adding a $(BOOTSTRAPEMACS) dependency here, we add it
774 ## separately below.
775 ## With GNU Make, we would just say "%.el : %.elc $(BOOTSTRAPEMACS)"
776 .el.elc:
777 @cd ../lisp; $(MAKE) $(MFLAGS) compile-onefile \
778 THEFILE=$< EMACS=${bootstrap_exe}
779
780 ## Since the .el.elc rule cannot specify an extra dependency, we do it here.
781 ${lisp} ${SOME_MACHINE_LISP}: $(BOOTSTRAPEMACS)
782
783 ## VCSWITNESS points to the file that holds info about the current checkout.
784 ## We use it as a heuristic to decide when to rebuild loaddefs.el.
785 ${lispsource}loaddefs.el: $(BOOTSTRAPEMACS) $(VCSWITNESS)
786 cd ../lisp; $(MAKE) $(MFLAGS) autoloads EMACS=${bootstrap_exe}
787
788 ## Dump an Emacs executable named bootstrap-emacs containing the
789 ## files from loadup.el in source form.
790 bootstrap-emacs${EXEEXT}: temacs${EXEEXT}
791 cd ../lisp; $(MAKE) $(MFLAGS) update-subdirs
792 if test "${CANNOT_DUMP}" = "yes"; then \
793 ln -f temacs${EXEEXT} bootstrap-emacs${EXEEXT}; \
794 else \
795 $(RUN_TEMACS) --batch --load loadup bootstrap || exit 1; \
796 mv -f emacs${EXEEXT} bootstrap-emacs${EXEEXT}; \
797 fi
798 @: Compile some files earlier to speed up further compilation.
799 cd ../lisp; $(MAKE) $(MFLAGS) compile-first EMACS=${bootstrap_exe}
800
801 ## Insert either autodeps.mk (if AUTO_DEPEND), else deps.mk.
802 @deps_frag@
803
804
805 ### Makefile.in ends here