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