aboutsummaryrefslogtreecommitdiffstats
path: root/src/Makefile.in
diff options
context:
space:
mode:
authorStefan Monnier2022-09-25 16:15:16 -0400
committerStefan Monnier2022-09-25 16:15:16 -0400
commit650c20f1ca4e07591a727e1cfcc74b3363d15985 (patch)
tree85d11f6437cde22f410c25e0e5f71a3131ebd07d /src/Makefile.in
parent8869332684c2302b5ba1ead4568bbc7ba1c0183e (diff)
parent4b85ae6a24380fb67a3315eaec9233f17a872473 (diff)
downloademacs-650c20f1ca4e07591a727e1cfcc74b3363d15985.tar.gz
emacs-650c20f1ca4e07591a727e1cfcc74b3363d15985.zip
Merge 'master' into noverlay
Diffstat (limited to 'src/Makefile.in')
-rw-r--r--src/Makefile.in491
1 files changed, 333 insertions, 158 deletions
diff --git a/src/Makefile.in b/src/Makefile.in
index 8a8df03e49f..059e6c717b4 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -1,6 +1,6 @@
1### @configure_input@ 1### @configure_input@
2 2
3# Copyright (C) 1985, 1987-1988, 1993-1995, 1999-2017 Free Software 3# Copyright (C) 1985, 1987-1988, 1993-1995, 1999-2022 Free Software
4# Foundation, Inc. 4# Foundation, Inc.
5 5
6# This file is part of GNU Emacs. 6# This file is part of GNU Emacs.
@@ -29,10 +29,12 @@ SHELL = @SHELL@
29# We use $(srcdir) explicitly in dependencies so as not to depend on VPATH. 29# We use $(srcdir) explicitly in dependencies so as not to depend on VPATH.
30srcdir = @srcdir@ 30srcdir = @srcdir@
31top_srcdir = @top_srcdir@ 31top_srcdir = @top_srcdir@
32top_builddir = @top_builddir@
32# MinGW CPPFLAGS may use this. 33# MinGW CPPFLAGS may use this.
33abs_top_srcdir=@abs_top_srcdir@ 34abs_top_srcdir=@abs_top_srcdir@
34VPATH = $(srcdir) 35VPATH = $(srcdir)
35CC = @CC@ 36CC = @CC@
37CXX = @CXX@
36CFLAGS = @CFLAGS@ 38CFLAGS = @CFLAGS@
37CPPFLAGS = @CPPFLAGS@ 39CPPFLAGS = @CPPFLAGS@
38LDFLAGS = @LDFLAGS@ 40LDFLAGS = @LDFLAGS@
@@ -54,9 +56,9 @@ lwlibdir = ../lwlib
54# Configuration files for .o files to depend on. 56# Configuration files for .o files to depend on.
55config_h = config.h $(srcdir)/conf_post.h 57config_h = config.h $(srcdir)/conf_post.h
56 58
57bootstrap_exe = ../src/bootstrap-emacs$(EXEEXT) 59HAVE_NATIVE_COMP = @HAVE_NATIVE_COMP@
58 60
59## ns-app if HAVE_NS, else empty. 61## ns-app if NS self contained app, else empty.
60OTHER_FILES = @OTHER_FILES@ 62OTHER_FILES = @OTHER_FILES@
61 63
62## Flags to pass for profiling builds 64## Flags to pass for profiling builds
@@ -104,7 +106,7 @@ LD_SWITCH_SYSTEM_TEMACS=@LD_SWITCH_SYSTEM_TEMACS@
104## Flags to pass to ld only for temacs. 106## Flags to pass to ld only for temacs.
105TEMACS_LDFLAGS = $(LD_SWITCH_SYSTEM) $(LD_SWITCH_SYSTEM_TEMACS) 107TEMACS_LDFLAGS = $(LD_SWITCH_SYSTEM) $(LD_SWITCH_SYSTEM_TEMACS)
106 108
107## If available, the names of the paxctl and setfattr programs. 109## If needed, the names of the paxctl and setfattr programs.
108## On grsecurity/PaX systems, unexec will fail due to a gap between 110## On grsecurity/PaX systems, unexec will fail due to a gap between
109## the bss section and the heap. Older versions need paxctl to work 111## the bss section and the heap. Older versions need paxctl to work
110## around this, newer ones setfattr. See Bug#11398 and Bug#16343. 112## around this, newer ones setfattr. See Bug#11398 and Bug#16343.
@@ -123,16 +125,19 @@ LIB_MATH=@LIB_MATH@
123## -lpthread, or empty. 125## -lpthread, or empty.
124LIB_PTHREAD=@LIB_PTHREAD@ 126LIB_PTHREAD=@LIB_PTHREAD@
125 127
126LIBIMAGE=@LIBTIFF@ @LIBJPEG@ @LIBPNG@ @LIBGIF@ @LIBXPM@ 128LIBIMAGE=@LIBTIFF@ @LIBJPEG@ @LIBPNG@ @LIBGIF@ @LIBXPM@ @WEBP_LIBS@
127 129
128XCB_LIBS=@XCB_LIBS@ 130XCB_LIBS=@XCB_LIBS@
129XFT_LIBS=@XFT_LIBS@ 131XFT_LIBS=@XFT_LIBS@
130LIBX_EXTRA=-lX11 $(XCB_LIBS) $(XFT_LIBS) 132XRENDER_LIBS=@XRENDER_LIBS@
133LIBX_EXTRA=-lX11 $(XCB_LIBS) $(XFT_LIBS) $(XRENDER_LIBS)
131 134
132FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ 135FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@
133FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ 136FONTCONFIG_LIBS = @FONTCONFIG_LIBS@
134FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ 137FREETYPE_CFLAGS = @FREETYPE_CFLAGS@
135FREETYPE_LIBS = @FREETYPE_LIBS@ 138FREETYPE_LIBS = @FREETYPE_LIBS@
139HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@
140HARFBUZZ_LIBS = @HARFBUZZ_LIBS@
136LIBOTF_CFLAGS = @LIBOTF_CFLAGS@ 141LIBOTF_CFLAGS = @LIBOTF_CFLAGS@
137LIBOTF_LIBS = @LIBOTF_LIBS@ 142LIBOTF_LIBS = @LIBOTF_LIBS@
138M17N_FLT_CFLAGS = @M17N_FLT_CFLAGS@ 143M17N_FLT_CFLAGS = @M17N_FLT_CFLAGS@
@@ -141,7 +146,7 @@ M17N_FLT_LIBS = @M17N_FLT_LIBS@
141LIB_ACL=@LIB_ACL@ 146LIB_ACL=@LIB_ACL@
142LIB_CLOCK_GETTIME=@LIB_CLOCK_GETTIME@ 147LIB_CLOCK_GETTIME=@LIB_CLOCK_GETTIME@
143LIB_EACCESS=@LIB_EACCESS@ 148LIB_EACCESS=@LIB_EACCESS@
144LIB_FDATASYNC=@LIB_FDATASYNC@ 149LIB_NANOSLEEP=@LIB_NANOSLEEP@
145LIB_TIMER_TIME=@LIB_TIMER_TIME@ 150LIB_TIMER_TIME=@LIB_TIMER_TIME@
146 151
147DBUS_CFLAGS = @DBUS_CFLAGS@ 152DBUS_CFLAGS = @DBUS_CFLAGS@
@@ -170,7 +175,7 @@ NOTIFY_LIBS = @NOTIFY_LIBS@
170 175
171## -ltermcap, or -lncurses, or -lcurses, or "". 176## -ltermcap, or -lncurses, or -lcurses, or "".
172LIBS_TERMCAP=@LIBS_TERMCAP@ 177LIBS_TERMCAP=@LIBS_TERMCAP@
173## terminfo.o if TERMINFO, else tparam.o. 178## terminfo.o if TERMINFO, else (on MS-DOS only: termcap.o +) tparam.o.
174TERMCAP_OBJ=@TERMCAP_OBJ@ 179TERMCAP_OBJ=@TERMCAP_OBJ@
175 180
176LIBXMU=@LIBXMU@ 181LIBXMU=@LIBXMU@
@@ -220,6 +225,8 @@ CFLAGS_SOUND= @CFLAGS_SOUND@
220RSVG_LIBS= @RSVG_LIBS@ 225RSVG_LIBS= @RSVG_LIBS@
221RSVG_CFLAGS= @RSVG_CFLAGS@ 226RSVG_CFLAGS= @RSVG_CFLAGS@
222 227
228WEBP_CFLAGS= @WEBP_CFLAGS@
229
223WEBKIT_LIBS= @WEBKIT_LIBS@ 230WEBKIT_LIBS= @WEBKIT_LIBS@
224WEBKIT_CFLAGS= @WEBKIT_CFLAGS@ 231WEBKIT_CFLAGS= @WEBKIT_CFLAGS@
225 232
@@ -232,15 +239,18 @@ IMAGEMAGICK_CFLAGS= @IMAGEMAGICK_CFLAGS@
232LIBXML2_LIBS = @LIBXML2_LIBS@ 239LIBXML2_LIBS = @LIBXML2_LIBS@
233LIBXML2_CFLAGS = @LIBXML2_CFLAGS@ 240LIBXML2_CFLAGS = @LIBXML2_CFLAGS@
234 241
242SQLITE3_LIBS = @SQLITE3_LIBS@
243
235GETADDRINFO_A_LIBS = @GETADDRINFO_A_LIBS@ 244GETADDRINFO_A_LIBS = @GETADDRINFO_A_LIBS@
236 245
237LIBLCMS2 = @LIBLCMS2@ 246LCMS2_LIBS = @LCMS2_LIBS@
247LCMS2_CFLAGS = @LCMS2_CFLAGS@
238 248
239LIBZ = @LIBZ@ 249LIBZ = @LIBZ@
240 250
241## system-specific libs for dynamic modules, else empty 251## system-specific libs for dynamic modules, else empty
242LIBMODULES = @LIBMODULES@ 252LIBMODULES = @LIBMODULES@
243## dynlib.o emacs-module.o if modules enabled, else empty 253## emacs-module.o if modules enabled, else empty
244MODULES_OBJ = @MODULES_OBJ@ 254MODULES_OBJ = @MODULES_OBJ@
245 255
246XRANDR_LIBS = @XRANDR_LIBS@ 256XRANDR_LIBS = @XRANDR_LIBS@
@@ -252,9 +262,21 @@ XINERAMA_CFLAGS = @XINERAMA_CFLAGS@
252XFIXES_LIBS = @XFIXES_LIBS@ 262XFIXES_LIBS = @XFIXES_LIBS@
253XFIXES_CFLAGS = @XFIXES_CFLAGS@ 263XFIXES_CFLAGS = @XFIXES_CFLAGS@
254 264
265XINPUT_LIBS = @XINPUT_LIBS@
266XINPUT_CFLAGS = @XINPUT_CFLAGS@
267
268XSYNC_LIBS = @XSYNC_LIBS@
269XSYNC_CFLAGS = @XSYNC_CFLAGS@
270
255XDBE_LIBS = @XDBE_LIBS@ 271XDBE_LIBS = @XDBE_LIBS@
256XDBE_CFLAGS = @XDBE_CFLAGS@ 272XDBE_CFLAGS = @XDBE_CFLAGS@
257 273
274XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@
275XCOMPOSITE_CFLAGS = @XCOMPOSITE_CFLAGS@
276
277XSHAPE_LIBS = @XSHAPE_LIBS@
278XSHAPE_CFLAGS = @XSHAPE_CFLAGS@
279
258## widget.o if USE_X_TOOLKIT, otherwise empty. 280## widget.o if USE_X_TOOLKIT, otherwise empty.
259WIDGET_OBJ=@WIDGET_OBJ@ 281WIDGET_OBJ=@WIDGET_OBJ@
260 282
@@ -277,13 +299,17 @@ NS_OBJC_OBJ=@NS_OBJC_OBJ@
277## Used only for GNUstep. 299## Used only for GNUstep.
278GNU_OBJC_CFLAGS=$(patsubst -specs=%-hardened-cc1,,@GNU_OBJC_CFLAGS@) 300GNU_OBJC_CFLAGS=$(patsubst -specs=%-hardened-cc1,,@GNU_OBJC_CFLAGS@)
279## w32fns.o w32menu.c w32reg.o fringe.o fontset.o w32font.o w32term.o 301## w32fns.o w32menu.c w32reg.o fringe.o fontset.o w32font.o w32term.o
280## w32xfns.o w32select.o image.o w32uniscribe.o if HAVE_W32, else 302## w32xfns.o w32select.o image.o w32uniscribe.o w32cygwinx.o if HAVE_W32,
281## empty. 303## w32cygwinx.o if CYGWIN but not HAVE_W32, else empty.
282W32_OBJ=@W32_OBJ@ 304W32_OBJ=@W32_OBJ@
283## -lkernel32 -luser32 -lusp10 -lgdi32 -lole32 -lcomdlg32 -lcomctl32 305## -lkernel32 -luser32 -lusp10 -lgdi32 -lole32 -lcomdlg32 -lcomctl32
284## --lwinspool if HAVE_W32, else empty. 306## -lwinspool if HAVE_W32,
307## -lkernel32 if CYGWIN but not HAVE_W32, else empty.
285W32_LIBS=@W32_LIBS@ 308W32_LIBS=@W32_LIBS@
286 309
310PGTK_OBJ=@PGTK_OBJ@
311PGTK_LIBS=@PGTK_LIBS@
312
287## emacs.res if HAVE_W32 313## emacs.res if HAVE_W32
288EMACSRES = @EMACSRES@ 314EMACSRES = @EMACSRES@
289## If HAVE_W32, compiler arguments for including 315## If HAVE_W32, compiler arguments for including
@@ -293,10 +319,11 @@ EMACSRES = @EMACSRES@
293W32_RES_LINK=@W32_RES_LINK@ 319W32_RES_LINK=@W32_RES_LINK@
294 320
295## Empty if !HAVE_X_WINDOWS 321## Empty if !HAVE_X_WINDOWS
296## xfont.o ftfont.o xftfont.o ftxfont.o if HAVE_XFT 322## xfont.o ftfont.o xftfont.o if HAVE_XFT
297## xfont.o ftfont.o ftxfont.o if HAVE_FREETYPE 323## xfont.o ftfont.o if HAVE_FREETYPE
298## ftfont.o ftcrfont.o if USE_CAIRO 324## xfont.o ftfont.o ftcrfont.o if USE_CAIRO
299## else xfont.o 325## else xfont.o
326## if HAVE_HARFBUZZ, hbfont.o is added regardless of the rest
300FONT_OBJ=@FONT_OBJ@ 327FONT_OBJ=@FONT_OBJ@
301 328
302## Empty for MinGW, cm.o for the rest. 329## Empty for MinGW, cm.o for the rest.
@@ -312,10 +339,22 @@ LIBGNUTLS_CFLAGS = @LIBGNUTLS_CFLAGS@
312LIBSYSTEMD_LIBS = @LIBSYSTEMD_LIBS@ 339LIBSYSTEMD_LIBS = @LIBSYSTEMD_LIBS@
313LIBSYSTEMD_CFLAGS = @LIBSYSTEMD_CFLAGS@ 340LIBSYSTEMD_CFLAGS = @LIBSYSTEMD_CFLAGS@
314 341
342JSON_LIBS = @JSON_LIBS@
343JSON_CFLAGS = @JSON_CFLAGS@
344JSON_OBJ = @JSON_OBJ@
345
315INTERVALS_H = dispextern.h intervals.h composite.h 346INTERVALS_H = dispextern.h intervals.h composite.h
316 347
317GETLOADAVG_LIBS = @GETLOADAVG_LIBS@ 348GETLOADAVG_LIBS = @GETLOADAVG_LIBS@
318 349
350LIBGMP = @LIBGMP@
351
352LIBGCCJIT_LIBS = @LIBGCCJIT_LIBS@
353LIBGCCJIT_CFLAGS = @LIBGCCJIT_CFLAGS@
354
355## dynlib.o if necessary, else empty
356DYNLIB_OBJ = @DYNLIB_OBJ@
357
319RUN_TEMACS = ./temacs 358RUN_TEMACS = ./temacs
320 359
321# Whether builds should contain details. '--no-build-details' or empty. 360# Whether builds should contain details. '--no-build-details' or empty.
@@ -323,33 +362,37 @@ BUILD_DETAILS = @BUILD_DETAILS@
323 362
324UNEXEC_OBJ = @UNEXEC_OBJ@ 363UNEXEC_OBJ = @UNEXEC_OBJ@
325 364
326CANNOT_DUMP=@CANNOT_DUMP@ 365HAIKU_OBJ = @HAIKU_OBJ@
366HAIKU_CXX_OBJ = @HAIKU_CXX_OBJ@
367HAIKU_LIBS = @HAIKU_LIBS@
368HAIKU_CFLAGS = @HAIKU_CFLAGS@
327 369
328# 'make' verbosity. 370DUMPING=@DUMPING@
329AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ 371CHECK_STRUCTS = @CHECK_STRUCTS@
372HAVE_PDUMPER = @HAVE_PDUMPER@
330 373
331AM_V_CC = $(am__v_CC_@AM_V@) 374HAVE_BE_APP = @HAVE_BE_APP@
332am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
333am__v_CC_0 = @echo " CC " $@;
334am__v_CC_1 =
335 375
336AM_V_CCLD = $(am__v_CCLD_@AM_V@) 376## ARM Macs require that all code have a valid signature. Since pdump
337am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) 377## invalidates the signature, we must re-sign to fix it.
338am__v_CCLD_0 = @echo " CCLD " $@; 378DO_CODESIGN=$(patsubst aarch64-apple-darwin%,yes,@configuration@)
339am__v_CCLD_1 =
340 379
341AM_V_GEN = $(am__v_GEN_@AM_V@) 380-include ${top_builddir}/src/verbose.mk
342am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
343am__v_GEN_0 = @echo " GEN " $@;
344am__v_GEN_1 =
345 381
346AM_V_at = $(am__v_at_@AM_V@) 382bootstrap_exe = ../src/bootstrap-emacs$(EXEEXT)
347am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) 383ifeq ($(DUMPING),pdumper)
348am__v_at_0 = @ 384bootstrap_pdmp := bootstrap-emacs.pdmp # Keep in sync with loadup.el
349am__v_at_1 = 385pdmp := emacs.pdmp
386else
387bootstrap_pdmp :=
388pdmp :=
389endif
350 390
351# Flags that might be in WARN_CFLAGS but are not valid for Objective C. 391# Flags that might be in WARN_CFLAGS but are not valid for Objective C.
352NON_OBJC_CFLAGS = -Wignored-attributes -Wignored-qualifiers -Wopenmp-simd 392NON_OBJC_CFLAGS = -Wignored-attributes -Wignored-qualifiers -Wopenmp-simd -Wnested-externs
393# Ditto, but for C++.
394NON_CXX_CFLAGS = -Wmissing-prototypes -Wnested-externs -Wold-style-definition \
395 -Wstrict-prototypes -Wno-override-init
353 396
354# -Demacs makes some files produce the correct version for use in Emacs. 397# -Demacs makes some files produce the correct version for use in Emacs.
355# MYCPPFLAGS is for by-hand Emacs-specific overrides, e.g., 398# MYCPPFLAGS is for by-hand Emacs-specific overrides, e.g.,
@@ -358,48 +401,54 @@ EMACS_CFLAGS=-Demacs $(MYCPPFLAGS) -I. -I$(srcdir) \
358 -I$(lib) -I$(top_srcdir)/lib \ 401 -I$(lib) -I$(top_srcdir)/lib \
359 $(C_SWITCH_MACHINE) $(C_SWITCH_SYSTEM) $(C_SWITCH_X_SITE) \ 402 $(C_SWITCH_MACHINE) $(C_SWITCH_SYSTEM) $(C_SWITCH_X_SITE) \
360 $(GNUSTEP_CFLAGS) $(CFLAGS_SOUND) $(RSVG_CFLAGS) $(IMAGEMAGICK_CFLAGS) \ 403 $(GNUSTEP_CFLAGS) $(CFLAGS_SOUND) $(RSVG_CFLAGS) $(IMAGEMAGICK_CFLAGS) \
361 $(PNG_CFLAGS) $(LIBXML2_CFLAGS) $(DBUS_CFLAGS) \ 404 $(PNG_CFLAGS) $(LIBXML2_CFLAGS) $(LIBGCCJIT_CFLAGS) $(DBUS_CFLAGS) \
362 $(XRANDR_CFLAGS) $(XINERAMA_CFLAGS) $(XFIXES_CFLAGS) $(XDBE_CFLAGS) \ 405 $(XRANDR_CFLAGS) $(XINERAMA_CFLAGS) $(XFIXES_CFLAGS) $(XDBE_CFLAGS) \
363 $(WEBKIT_CFLAGS) \ 406 $(XINPUT_CFLAGS) $(WEBP_CFLAGS) $(WEBKIT_CFLAGS) $(LCMS2_CFLAGS) \
364 $(SETTINGS_CFLAGS) $(FREETYPE_CFLAGS) $(FONTCONFIG_CFLAGS) \ 407 $(SETTINGS_CFLAGS) $(FREETYPE_CFLAGS) $(FONTCONFIG_CFLAGS) \
365 $(LIBOTF_CFLAGS) $(M17N_FLT_CFLAGS) $(DEPFLAGS) \ 408 $(HARFBUZZ_CFLAGS) $(LIBOTF_CFLAGS) $(M17N_FLT_CFLAGS) $(DEPFLAGS) \
366 $(LIBSYSTEMD_CFLAGS) \ 409 $(LIBSYSTEMD_CFLAGS) $(JSON_CFLAGS) $(XSYNC_CFLAGS) \
367 $(LIBGNUTLS_CFLAGS) $(NOTIFY_CFLAGS) $(CAIRO_CFLAGS) \ 410 $(LIBGNUTLS_CFLAGS) $(NOTIFY_CFLAGS) $(CAIRO_CFLAGS) \
368 $(WERROR_CFLAGS) 411 $(WERROR_CFLAGS) $(HAIKU_CFLAGS) $(XCOMPOSITE_CFLAGS) $(XSHAPE_CFLAGS)
369ALL_CFLAGS = $(EMACS_CFLAGS) $(WARN_CFLAGS) $(CFLAGS) 412ALL_CFLAGS = $(EMACS_CFLAGS) $(WARN_CFLAGS) $(CFLAGS)
370ALL_OBJC_CFLAGS = $(EMACS_CFLAGS) \ 413ALL_OBJC_CFLAGS = $(EMACS_CFLAGS) \
371 $(filter-out $(NON_OBJC_CFLAGS),$(WARN_CFLAGS)) $(CFLAGS) \ 414 $(filter-out $(NON_OBJC_CFLAGS),$(WARN_CFLAGS)) $(CFLAGS) \
372 $(GNU_OBJC_CFLAGS) 415 $(GNU_OBJC_CFLAGS)
416ALL_CXX_CFLAGS = $(EMACS_CFLAGS) \
417 $(filter-out $(NON_CXX_CFLAGS),$(WARN_CFLAGS)) $(CXXFLAGS)
373 418
374.SUFFIXES: .m 419.SUFFIXES: .m .cc
375.c.o: 420.c.o:
376 $(AM_V_CC)$(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) $(PROFILING_CFLAGS) $< 421 $(AM_V_CC)$(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) $(PROFILING_CFLAGS) $<
377.m.o: 422.m.o:
378 $(AM_V_CC)$(CC) -c $(CPPFLAGS) $(ALL_OBJC_CFLAGS) $(PROFILING_CFLAGS) $< 423 $(AM_V_CC)$(CC) -c $(CPPFLAGS) $(ALL_OBJC_CFLAGS) $(PROFILING_CFLAGS) $<
424.cc.o:
425 $(AM_V_CXX)$(CXX) -c $(CPPFLAGS) $(ALL_CXX_CFLAGS) $(PROFILING_CFLAGS) $<
379 426
380## lastfile must follow all files whose initialized data areas should 427## lastfile must follow all files whose initialized data areas should
381## be dumped as pure by dump-emacs. 428## be dumped as pure by dump-emacs.
382base_obj = dispnew.o frame.o scroll.o xdisp.o menu.o $(XMENU_OBJ) window.o \ 429base_obj = dispnew.o frame.o scroll.o xdisp.o menu.o $(XMENU_OBJ) window.o \
383 charset.o coding.o category.o ccl.o character.o chartab.o bidi.o \ 430 charset.o coding.o category.o ccl.o character.o chartab.o bidi.o \
384 $(CM_OBJ) term.o terminal.o xfaces.o $(XOBJ) $(GTK_OBJ) $(DBUS_OBJ) \ 431 $(CM_OBJ) term.o terminal.o xfaces.o $(XOBJ) $(GTK_OBJ) $(DBUS_OBJ) \
385 emacs.o keyboard.o macros.o keymap.o sysdep.o \ 432 emacs.o keyboard.o macros.o keymap.o sysdep.o \
386 buffer.o filelock.o insdel.o marker.o \ 433 bignum.o buffer.o filelock.o insdel.o marker.o \
387 minibuf.o fileio.o dired.o \ 434 minibuf.o fileio.o dired.o \
388 cmds.o casetab.o casefiddle.o indent.o search.o regex.o undo.o \ 435 cmds.o casetab.o casefiddle.o indent.o search.o regex-emacs.o undo.o \
389 alloc.o data.o doc.o editfns.o callint.o \ 436 alloc.o pdumper.o data.o doc.o editfns.o callint.o \
390 eval.o floatfns.o fns.o font.o print.o lread.o $(MODULES_OBJ) \ 437 eval.o floatfns.o fns.o sort.o font.o print.o lread.o $(MODULES_OBJ) \
391 syntax.o $(UNEXEC_OBJ) bytecode.o \ 438 syntax.o $(UNEXEC_OBJ) bytecode.o comp.o $(DYNLIB_OBJ) \
392 process.o gnutls.o callproc.o \ 439 process.o gnutls.o callproc.o \
393 region-cache.o sound.o atimer.o \ 440 region-cache.o sound.o timefns.o atimer.o \
394 doprnt.o intervals.o textprop.o composite.o xml.o lcms.o $(NOTIFY_OBJ) \ 441 doprnt.o intervals.o textprop.o composite.o xml.o lcms.o $(NOTIFY_OBJ) \
395 $(XWIDGETS_OBJ) \ 442 $(XWIDGETS_OBJ) \
396 profiler.o decompress.o \ 443 profiler.o decompress.o \
397 thread.o systhread.o \ 444 thread.o systhread.o sqlite.o \
398 itree.o \ 445 itree.o \
399 $(if $(HYBRID_MALLOC),sheap.o) \ 446 $(if $(HYBRID_MALLOC),sheap.o) \
400 $(MSDOS_OBJ) $(MSDOS_X_OBJ) $(NS_OBJ) $(CYGWIN_OBJ) $(FONT_OBJ) \ 447 $(MSDOS_OBJ) $(MSDOS_X_OBJ) $(NS_OBJ) $(CYGWIN_OBJ) $(FONT_OBJ) \
401 $(W32_OBJ) $(WINDOW_SYSTEM_OBJ) $(XGSELOBJ) 448 $(W32_OBJ) $(WINDOW_SYSTEM_OBJ) $(XGSELOBJ) $(JSON_OBJ) \
402obj = $(base_obj) $(NS_OBJC_OBJ) 449 $(HAIKU_OBJ) $(PGTK_OBJ)
450doc_obj = $(base_obj) $(NS_OBJC_OBJ)
451obj = $(doc_obj) $(HAIKU_CXX_OBJ)
403 452
404## Object files used on some machine or other. 453## Object files used on some machine or other.
405## These go in the DOC file on all machines in case they are needed. 454## These go in the DOC file on all machines in case they are needed.
@@ -409,10 +458,12 @@ SOME_MACHINE_OBJECTS = dosfns.o msdos.o \
409 xterm.o xfns.o xmenu.o xselect.o xrdb.o xsmfns.o fringe.o image.o \ 458 xterm.o xfns.o xmenu.o xselect.o xrdb.o xsmfns.o fringe.o image.o \
410 fontset.o dbusbind.o cygw32.o \ 459 fontset.o dbusbind.o cygw32.o \
411 nsterm.o nsfns.o nsmenu.o nsselect.o nsimage.o nsfont.o macfont.o \ 460 nsterm.o nsfns.o nsmenu.o nsselect.o nsimage.o nsfont.o macfont.o \
412 w32.o w32console.o w32fns.o w32heap.o w32inevt.o w32notify.o \ 461 nsxwidget.o \
462 w32.o w32console.o w32cygwinx.o w32fns.o w32heap.o w32inevt.o w32notify.o \
413 w32menu.o w32proc.o w32reg.o w32select.o w32term.o w32xfns.o \ 463 w32menu.o w32proc.o w32reg.o w32select.o w32term.o w32xfns.o \
414 w16select.o widget.o xfont.o ftfont.o xftfont.o ftxfont.o gtkutil.o \ 464 w16select.o widget.o xfont.o ftfont.o xftfont.o gtkutil.o \
415 xsettings.o xgselect.o termcap.o 465 xsettings.o xgselect.o termcap.o hbfont.o \
466 haikuterm.o haikufns.o haikumenu.o haikufont.o
416 467
417## gmalloc.o if !SYSTEM_MALLOC && !DOUG_LEA_MALLOC, else empty. 468## gmalloc.o if !SYSTEM_MALLOC && !DOUG_LEA_MALLOC, else empty.
418GMALLOC_OBJ=@GMALLOC_OBJ@ 469GMALLOC_OBJ=@GMALLOC_OBJ@
@@ -437,6 +488,27 @@ otherobj= $(TERMCAP_OBJ) $(PRE_ALLOC_OBJ) $(GMALLOC_OBJ) $(RALLOC_OBJ) \
437FIRSTFILE_OBJ=@FIRSTFILE_OBJ@ 488FIRSTFILE_OBJ=@FIRSTFILE_OBJ@
438ALLOBJS = $(FIRSTFILE_OBJ) $(VMLIMIT_OBJ) $(obj) $(otherobj) 489ALLOBJS = $(FIRSTFILE_OBJ) $(VMLIMIT_OBJ) $(obj) $(otherobj)
439 490
491# Must be first, before dep inclusion!
492ifneq ($(HAVE_BE_APP),yes)
493all: emacs$(EXEEXT) $(pdmp) $(OTHER_FILES)
494else
495all: Emacs Emacs.pdmp $(OTHER_FILES)
496endif
497ifeq ($(HAVE_NATIVE_COMP):$(NATIVE_DISABLED),yes:)
498all: ../native-lisp
499endif
500.PHONY: all
501
502dmpstruct_headers=$(srcdir)/lisp.h $(srcdir)/buffer.h $(srcdir)/itree.h \
503 $(srcdir)/intervals.h $(srcdir)/charset.h $(srcdir)/bignum.h
504ifeq ($(CHECK_STRUCTS),true)
505pdumper.o: dmpstruct.h
506endif
507dmpstruct.h: $(srcdir)/dmpstruct.awk
508dmpstruct.h: $(libsrc)/make-fingerprint$(EXEEXT) $(dmpstruct_headers)
509 $(AM_V_GEN)POSIXLY_CORRECT=1 awk -f $(srcdir)/dmpstruct.awk \
510 $(dmpstruct_headers) > $@
511
440AUTO_DEPEND = @AUTO_DEPEND@ 512AUTO_DEPEND = @AUTO_DEPEND@
441DEPDIR = deps 513DEPDIR = deps
442ifeq ($(AUTO_DEPEND),yes) 514ifeq ($(AUTO_DEPEND),yes)
@@ -447,9 +519,6 @@ else
447 include $(srcdir)/deps.mk 519 include $(srcdir)/deps.mk
448endif 520endif
449 521
450all: emacs$(EXEEXT) $(OTHER_FILES)
451.PHONY: all
452
453## This is the list of all Lisp files that might be loaded into the 522## This is the list of all Lisp files that might be loaded into the
454## dumped Emacs. Some of them are not loaded on all platforms, but 523## dumped Emacs. Some of them are not loaded on all platforms, but
455## the DOC file on every platform uses them (because the DOC file is 524## the DOC file on every platform uses them (because the DOC file is
@@ -467,11 +536,11 @@ all: emacs$(EXEEXT) $(OTHER_FILES)
467## but the second one seems like it could be more future-proof. 536## but the second one seems like it could be more future-proof.
468shortlisp = 537shortlisp =
469lisp.mk: $(lispsource)/loadup.el 538lisp.mk: $(lispsource)/loadup.el
470 @rm -f $@
471 ${AM_V_GEN}( printf 'shortlisp = \\\n'; \ 539 ${AM_V_GEN}( printf 'shortlisp = \\\n'; \
472 sed -n 's/^[ \t]*(load "\([^"]*\)".*/\1/p' $< | \ 540 sed -n 's/^[ \t]*(load "\([^"]*\)".*/\1/p' $< | \
473 sed -e 's/$$/.elc \\/' -e 's/\.el\.elc/.el/'; \ 541 sed -e 's/$$/.elc \\/' -e 's/\.el\.elc/.el/'; \
474 echo "" ) > $@ 542 echo "" ) > $@.tmp
543 $(AM_V_at)mv -f $@.tmp $@
475 544
476-include lisp.mk 545-include lisp.mk
477shortlisp_filter = leim/leim-list.el site-load.elc site-init.elc 546shortlisp_filter = leim/leim-list.el site-load.elc site-init.elc
@@ -480,28 +549,31 @@ shortlisp := $(filter-out ${shortlisp_filter},${shortlisp})
480## the critical path (relevant in parallel compilations). 549## the critical path (relevant in parallel compilations).
481## We don't really need to sort, but may as well use it to remove duplicates. 550## We don't really need to sort, but may as well use it to remove duplicates.
482shortlisp := loaddefs.el loadup.el $(sort ${shortlisp}) 551shortlisp := loaddefs.el loadup.el $(sort ${shortlisp})
552export LISP_PRELOADED = ${shortlisp}
483lisp = $(addprefix ${lispsource}/,${shortlisp}) 553lisp = $(addprefix ${lispsource}/,${shortlisp})
484 554
485## Construct full set of libraries to be linked. 555## Construct full set of libraries to be linked.
486LIBES = $(LIBS) $(W32_LIBS) $(LIBS_GNUSTEP) $(LIBX_BASE) $(LIBIMAGE) \ 556LIBES = $(LIBS) $(W32_LIBS) $(LIBS_GNUSTEP) $(PGTK_LIBS) $(LIBX_BASE) $(LIBIMAGE) \
487 $(LIBX_OTHER) $(LIBSOUND) \ 557 $(LIBX_OTHER) $(LIBSOUND) \
488 $(RSVG_LIBS) $(IMAGEMAGICK_LIBS) $(LIB_ACL) $(LIB_CLOCK_GETTIME) \ 558 $(RSVG_LIBS) $(IMAGEMAGICK_LIBS) $(LIB_ACL) $(LIB_CLOCK_GETTIME) \
489 $(WEBKIT_LIBS) \ 559 $(LIB_NANOSLEEP) $(WEBKIT_LIBS) \
490 $(LIB_EACCESS) $(LIB_FDATASYNC) $(LIB_TIMER_TIME) $(DBUS_LIBS) \ 560 $(LIB_EACCESS) $(LIB_TIMER_TIME) $(DBUS_LIBS) \
491 $(LIB_EXECINFO) $(XRANDR_LIBS) $(XINERAMA_LIBS) $(XFIXES_LIBS) \ 561 $(LIB_EXECINFO) $(XRANDR_LIBS) $(XINERAMA_LIBS) $(XFIXES_LIBS) \
492 $(XDBE_LIBS) \ 562 $(XDBE_LIBS) $(XSYNC_LIBS) \
493 $(LIBXML2_LIBS) $(LIBGPM) $(LIBS_SYSTEM) $(CAIRO_LIBS) \ 563 $(LIBXML2_LIBS) $(LIBGPM) $(LIBS_SYSTEM) $(CAIRO_LIBS) \
494 $(LIBS_TERMCAP) $(GETLOADAVG_LIBS) $(SETTINGS_LIBS) $(LIBSELINUX_LIBS) \ 564 $(LIBS_TERMCAP) $(GETLOADAVG_LIBS) $(SETTINGS_LIBS) $(LIBSELINUX_LIBS) \
495 $(FREETYPE_LIBS) $(FONTCONFIG_LIBS) $(LIBOTF_LIBS) $(M17N_FLT_LIBS) \ 565 $(FREETYPE_LIBS) $(FONTCONFIG_LIBS) $(HARFBUZZ_LIBS) $(LIBOTF_LIBS) $(M17N_FLT_LIBS) \
496 $(LIBGNUTLS_LIBS) $(LIB_PTHREAD) $(GETADDRINFO_A_LIBS) $(LIBLCMS2) \ 566 $(LIBGNUTLS_LIBS) $(LIB_PTHREAD) $(GETADDRINFO_A_LIBS) $(LCMS2_LIBS) \
497 $(NOTIFY_LIBS) $(LIB_MATH) $(LIBZ) $(LIBMODULES) $(LIBSYSTEMD_LIBS) 567 $(NOTIFY_LIBS) $(LIB_MATH) $(LIBZ) $(LIBMODULES) $(LIBSYSTEMD_LIBS) \
498 568 $(JSON_LIBS) $(LIBGMP) $(LIBGCCJIT_LIBS) $(XINPUT_LIBS) $(HAIKU_LIBS) \
499## FORCE it so that admin/unidata can decide whether these files 569 $(SQLITE3_LIBS) $(XCOMPOSITE_LIBS) $(XSHAPE_LIBS)
500## are up-to-date. Although since charprop depends on bootstrap-emacs, 570
501## and emacs (which recreates bootstrap-emacs) depends on charprop, 571## FORCE it so that admin/unidata can decide whether this file is
502## in practice this rule was always run anyway. 572## up-to-date. Although since charprop depends on bootstrap-emacs,
503$(srcdir)/macuvs.h $(lispsource)/international/charprop.el: \ 573## and emacs depends on charprop, in practice this rule was always run
504 bootstrap-emacs$(EXEEXT) FORCE 574## anyway.
575$(lispsource)/international/charprop.el: \
576 FORCE | bootstrap-emacs$(EXEEXT) $(bootstrap_pdmp)
505 $(MAKE) -C ../admin/unidata all EMACS="../$(bootstrap_exe)" 577 $(MAKE) -C ../admin/unidata all EMACS="../$(bootstrap_exe)"
506 578
507## We require charprop.el to exist before ucs-normalize.el is 579## We require charprop.el to exist before ucs-normalize.el is
@@ -516,13 +588,19 @@ ${lispintdir}/cp51932.el ${lispintdir}/eucjp-ms.el: FORCE
516 588
517charsets = ${top_srcdir}/admin/charsets/charsets.stamp 589charsets = ${top_srcdir}/admin/charsets/charsets.stamp
518${charsets}: FORCE 590${charsets}: FORCE
519 ${MAKE} -C ../admin/charsets all 591 $(MAKE) -C ../admin/charsets all
520 592
521charscript = ${lispintdir}/charscript.el 593charscript = ${lispintdir}/charscript.el
522${charscript}: FORCE 594${charscript}: FORCE
523 $(MAKE) -C ../admin/unidata $(notdir $@) 595 $(MAKE) -C ../admin/unidata $(notdir $@)
524 596
525${lispintdir}/characters.elc: ${charscript:.el=.elc} 597emoji-zwj = ${lispintdir}/emoji-zwj.el
598${emoji-zwj}: FORCE
599 $(MAKE) -C ../admin/unidata $(notdir $@)
600
601${lispintdir}/characters.elc: ${charscript:.el=.elc} ${emoji-zwj:.el=.elc}
602
603SYSTEM_TYPE = @SYSTEM_TYPE@
526 604
527## The dumped Emacs is as functional and more efficient than 605## The dumped Emacs is as functional and more efficient than
528## bootstrap-emacs, so we replace the latter with the former. 606## bootstrap-emacs, so we replace the latter with the former.
@@ -532,37 +610,53 @@ ${lispintdir}/characters.elc: ${charscript:.el=.elc}
532emacs$(EXEEXT): temacs$(EXEEXT) \ 610emacs$(EXEEXT): temacs$(EXEEXT) \
533 lisp.mk $(etc)/DOC $(lisp) \ 611 lisp.mk $(etc)/DOC $(lisp) \
534 $(lispsource)/international/charprop.el ${charsets} 612 $(lispsource)/international/charprop.el ${charsets}
535ifeq ($(CANNOT_DUMP),yes) 613ifeq ($(SYSTEM_TYPE),cygwin)
536 ln -f temacs$(EXEEXT) $@ 614 find ${top_builddir} -name '*.eln' | rebase -v -O -T -
537else 615endif
538 LC_ALL=C $(RUN_TEMACS) -batch $(BUILD_DETAILS) -l loadup dump 616ifeq ($(DUMPING),unexec)
617 LC_ALL=C $(RUN_TEMACS) -batch $(BUILD_DETAILS) -l loadup --temacs=dump
539 ifneq ($(PAXCTL_dumped),) 618 ifneq ($(PAXCTL_dumped),)
540 $(PAXCTL_dumped) $@ 619 $(PAXCTL_dumped) emacs$(EXEEXT)
541 endif 620 endif
542 ln -f $@ bootstrap-emacs$(EXEEXT) 621 cp -f $@ bootstrap-emacs$(EXEEXT)
622else
623 rm -f $@ && cp -f temacs$(EXEEXT) $@
624endif
625
626## On Haiku, also produce a binary named Emacs with the appropriate
627## icon set.
628
629ifeq ($(HAVE_BE_APP),yes)
630Emacs: emacs$(EXEEXT) $(libsrc)/be-resources
631 $(AM_V_GEN) cp -f emacs$(EXEEXT) $@
632 $(AM_V_at) $(libsrc)/be-resources \
633 $(etc)/images/icons/hicolor/32x32/apps/emacs.png $@
634Emacs.pdmp: $(pdmp)
635 $(AM_V_GEN) cp -f $(pdmp) $@
636endif
637
638ifeq ($(DUMPING),pdumper)
639$(pdmp): emacs$(EXEEXT) $(lispsource)/loaddefs.el $(lispsource)/loaddefs.elc
640 LC_ALL=C $(RUN_TEMACS) -batch $(BUILD_DETAILS) -l loadup --temacs=pdump \
641 --bin-dest $(BIN_DESTDIR) --eln-dest $(ELN_DESTDIR)
642 cp -f $@ $(bootstrap_pdmp)
543endif 643endif
544 644
545## We run make-docfile twice because the command line may get too long
546## on some systems. Unfortunately, no-one has any idea
547## exactly how long the maximum safe command line length is on all the
548## various systems that Emacs supports.
549##
550## $(SOME_MACHINE_OBJECTS) comes before $(obj) because some files may 645## $(SOME_MACHINE_OBJECTS) comes before $(obj) because some files may
551## or may not be included in $(obj), but they are always included in 646## or may not be included in $(obj), but they are always included in
552## $(SOME_MACHINE_OBJECTS). Since a file is processed when it is mentioned 647## $(SOME_MACHINE_OBJECTS). Since a file is processed when it is mentioned
553## for the first time, this prevents any variation between configurations 648## for the first time, this prevents any variation between configurations
554## in the contents of the DOC file. 649## in the contents of the DOC file.
555## 650##
556$(etc)/DOC: lisp.mk $(libsrc)/make-docfile$(EXEEXT) $(obj) $(lisp) 651$(etc)/DOC: $(libsrc)/make-docfile$(EXEEXT) $(doc_obj)
557 $(AM_V_GEN)$(MKDIR_P) $(etc) 652 $(AM_V_GEN)$(MKDIR_P) $(etc)
558 -$(AM_V_at)rm -f $(etc)/DOC 653 $(AM_V_at)rm -f $(etc)/DOC
559 $(AM_V_at)$(libsrc)/make-docfile -d $(srcdir) \ 654 $(AM_V_at)$(libsrc)/make-docfile -d $(srcdir) \
560 $(SOME_MACHINE_OBJECTS) $(obj) > $(etc)/DOC 655 $(SOME_MACHINE_OBJECTS) $(doc_obj) > $(etc)/DOC
561 $(AM_V_at)$(libsrc)/make-docfile -a $(etc)/DOC -d $(lispsource) \
562 $(shortlisp)
563 656
564$(libsrc)/make-docfile$(EXEEXT): $(lib)/libgnu.a 657$(libsrc)/make-docfile$(EXEEXT) $(libsrc)/make-fingerprint$(EXEEXT): \
565 $(MAKE) -C $(libsrc) make-docfile$(EXEEXT) 658 $(lib)/libgnu.a
659 $(MAKE) -C $(dir $@) $(notdir $@)
566 660
567buildobj.h: Makefile 661buildobj.h: Makefile
568 $(AM_V_GEN)for i in $(ALLOBJS); do \ 662 $(AM_V_GEN)for i in $(ALLOBJS); do \
@@ -573,13 +667,8 @@ buildobj.h: Makefile
573 667
574GLOBAL_SOURCES = $(base_obj:.o=.c) $(NS_OBJC_OBJ:.o=.m) 668GLOBAL_SOURCES = $(base_obj:.o=.c) $(NS_OBJC_OBJ:.o=.m)
575 669
576AM_V_GLOBALS = $(am__v_GLOBALS_@AM_V@)
577am__v_GLOBALS_ = $(am__v_GLOBALS_@AM_DEFAULT_V@)
578am__v_GLOBALS_0 = @echo " GEN " globals.h;
579am__v_GLOBALS_1 =
580
581gl-stamp: $(libsrc)/make-docfile$(EXEEXT) $(GLOBAL_SOURCES) 670gl-stamp: $(libsrc)/make-docfile$(EXEEXT) $(GLOBAL_SOURCES)
582 $(AM_V_GLOBALS)$(libsrc)/make-docfile -d $(srcdir) -g $(obj) > globals.tmp 671 $(AM_V_GLOBALS)$(libsrc)/make-docfile -d $(srcdir) -g $(doc_obj) > globals.tmp
583 $(AM_V_at)$(top_srcdir)/build-aux/move-if-change globals.tmp globals.h 672 $(AM_V_at)$(top_srcdir)/build-aux/move-if-change globals.tmp globals.h
584 $(AM_V_at)echo timestamp > $@ 673 $(AM_V_at)echo timestamp > $@
585 674
@@ -590,18 +679,38 @@ $(ALLOBJS): globals.h
590LIBEGNU_ARCHIVE = $(lib)/lib$(if $(HYBRID_MALLOC),e)gnu.a 679LIBEGNU_ARCHIVE = $(lib)/lib$(if $(HYBRID_MALLOC),e)gnu.a
591 680
592$(LIBEGNU_ARCHIVE): $(config_h) 681$(LIBEGNU_ARCHIVE): $(config_h)
593 $(MAKE) -C $(lib) all 682 $(MAKE) -C $(dir $@) all
683
684ifeq ($(HAVE_PDUMPER),yes)
685MAKE_PDUMPER_FINGERPRINT = $(libsrc)/make-fingerprint$(EXEEXT)
686else
687MAKE_PDUMPER_FINGERPRINT =
688endif
594 689
595## We have to create $(etc) here because init_cmdargs tests its 690## We have to create $(etc) here because init_cmdargs tests its
596## existence when setting Vinstallation_directory (FIXME?). 691## existence when setting Vinstallation_directory (FIXME?).
597## This goes on to affect various things, and the emacs binary fails 692## This goes on to affect various things, and the emacs binary fails
598## to start if Vinstallation_directory has the wrong value. 693## to start if Vinstallation_directory has the wrong value.
599temacs$(EXEEXT): $(LIBXMENU) $(ALLOBJS) \ 694temacs$(EXEEXT): $(LIBXMENU) $(ALLOBJS) $(LIBEGNU_ARCHIVE) $(EMACSRES) \
600 $(LIBEGNU_ARCHIVE) $(EMACSRES) ${charsets} ${charscript} 695 $(charsets) $(charscript) ${emoji-zwj} $(MAKE_PDUMPER_FINGERPRINT)
601 $(AM_V_CCLD)$(CC) $(ALL_CFLAGS) $(TEMACS_LDFLAGS) $(LDFLAGS) \ 696ifeq ($(HAVE_BE_APP),yes)
602 -o temacs $(ALLOBJS) $(LIBEGNU_ARCHIVE) $(W32_RES_LINK) $(LIBES) 697 $(AM_V_CXXLD)$(CXX) -o $@.tmp \
698 $(ALL_CFLAGS) $(TEMACS_LDFLAGS) $(LDFLAGS) \
699 $(ALLOBJS) $(LIBEGNU_ARCHIVE) $(W32_RES_LINK) $(LIBES) -lstdc++
700else
701 $(AM_V_CCLD)$(CC) -o $@.tmp \
702 $(ALL_CFLAGS) $(CXXFLAGS) $(TEMACS_LDFLAGS) $(LDFLAGS) \
703 $(ALLOBJS) $(LIBEGNU_ARCHIVE) $(W32_RES_LINK) $(LIBES)
704endif
705ifeq ($(HAVE_PDUMPER),yes)
706 $(AM_V_at)$(MAKE_PDUMPER_FINGERPRINT) $@.tmp
707ifeq ($(DO_CODESIGN),yes)
708 codesign -s - -f $@.tmp
709endif
710endif
711 $(AM_V_at)mv $@.tmp $@
603 $(MKDIR_P) $(etc) 712 $(MKDIR_P) $(etc)
604ifneq ($(CANNOT_DUMP),yes) 713ifeq ($(DUMPING),unexec)
605 ifneq ($(PAXCTL_notdumped),) 714 ifneq ($(PAXCTL_notdumped),)
606 $(PAXCTL_notdumped) $@ 715 $(PAXCTL_notdumped) $@
607 endif 716 endif
@@ -610,15 +719,15 @@ endif
610## The following oldxmenu-related rules are only (possibly) used if 719## The following oldxmenu-related rules are only (possibly) used if
611## HAVE_X11 && !USE_GTK, but there is no harm in always defining them. 720## HAVE_X11 && !USE_GTK, but there is no harm in always defining them.
612$(lwlibdir)/liblw.a: $(config_h) globals.h lisp.h FORCE 721$(lwlibdir)/liblw.a: $(config_h) globals.h lisp.h FORCE
613 $(MAKE) -C $(lwlibdir) liblw.a 722 $(MAKE) -C $(dir $@) $(notdir $@)
614$(oldXMenudir)/libXMenu11.a: FORCE 723$(oldXMenudir)/libXMenu11.a: FORCE
615 $(MAKE) -C $(oldXMenudir) libXMenu11.a 724 $(MAKE) -C $(dir $@) $(notdir $@)
616FORCE: 725FORCE:
617.PHONY: FORCE 726.PHONY: FORCE
618 727
619.PRECIOUS: ../config.status Makefile 728.PRECIOUS: ../config.status Makefile
620../config.status: $(top_srcdir)/configure.ac $(top_srcdir)/m4/*.m4 729../config.status: $(top_srcdir)/configure.ac $(top_srcdir)/m4/*.m4
621 $(MAKE) -C .. $(notdir $@) 730 $(MAKE) -C $(dir $@) $(notdir $@)
622Makefile: ../config.status $(srcdir)/Makefile.in 731Makefile: ../config.status $(srcdir)/Makefile.in
623 $(MAKE) -C .. src/$@ 732 $(MAKE) -C .. src/$@
624 733
@@ -628,21 +737,27 @@ emacs.res: FORCE
628 $(MAKE) -C ../nt ../src/emacs.res 737 $(MAKE) -C ../nt ../src/emacs.res
629 738
630.PHONY: ns-app 739.PHONY: ns-app
631ns-app: emacs$(EXEEXT) 740ns-app: emacs$(EXEEXT) $(pdmp)
632 $(MAKE) -C ../nextstep all 741 $(MAKE) -C ../nextstep all
633 742
634.PHONY: mostlyclean clean bootstrap-clean distclean maintainer-clean 743.PHONY: mostlyclean clean bootstrap-clean distclean maintainer-clean
635.PHONY: versionclean extraclean 744.PHONY: versionclean
636 745
637mostlyclean: 746mostlyclean:
638 rm -f temacs$(EXEEXT) core *.core \#* *.o 747 rm -f temacs$(EXEEXT) core ./*.core \#* ./*.o
748 rm -f dmpstruct.h
749 rm -f emacs.pdmp
639 rm -f ../etc/DOC 750 rm -f ../etc/DOC
640 rm -f bootstrap-emacs$(EXEEXT) emacs-$(version)$(EXEEXT) 751 rm -f bootstrap-emacs$(EXEEXT) $(bootstrap_pdmp)
752 rm -f emacs-$(version)$(EXEEXT)
641 rm -f buildobj.h 753 rm -f buildobj.h
642 rm -f globals.h gl-stamp 754 rm -f globals.h gl-stamp
643 rm -f *.res *.tmp 755 rm -f ./*.res ./*.tmp
644clean: mostlyclean 756versionclean:
645 rm -f emacs-*.*.*[0-9]$(EXEEXT) emacs$(EXEEXT) $(DEPDIR)/* 757 rm -f emacs$(EXEEXT) emacs-*.*.*[0-9]$(EXEEXT) emacs-*.*.*[0-9].pdmp
758 rm -f ../etc/DOC*
759clean: mostlyclean versionclean
760 rm -f $(DEPDIR)/*
646 761
647## bootstrap-clean is used to clean up just before a bootstrap. 762## bootstrap-clean is used to clean up just before a bootstrap.
648## It should remove all files generated during a compilation/bootstrap, 763## It should remove all files generated during a compilation/bootstrap,
@@ -656,48 +771,46 @@ bootstrap-clean: clean
656 fi 771 fi
657 772
658distclean: bootstrap-clean 773distclean: bootstrap-clean
659 rm -f Makefile lisp.mk 774 rm -f Makefile lisp.mk verbose.mk
660 rm -fr $(DEPDIR) 775 rm -fr $(DEPDIR)
661 776
662maintainer-clean: distclean 777maintainer-clean: distclean
663 rm -f TAGS 778 rm -f TAGS
664versionclean:
665 -rm -f emacs$(EXEEXT) emacs-*.*.*[0-9]$(EXEEXT) ../etc/DOC*
666extraclean: distclean
667 -rm -f *~ \#*
668
669 779
670ETAGS = ../lib-src/etags${EXEEXT} 780ETAGS = ../lib-src/etags${EXEEXT}
671 781
672${ETAGS}: FORCE 782${ETAGS}: FORCE
673 ${MAKE} -C ../lib-src $(notdir $@) 783 $(MAKE) -C $(dir $@) $(notdir $@)
674 784
675ctagsfiles1 = $(wildcard ${srcdir}/*.[hc]) 785# Remove macuvs.h since it'd cause `src/emacs`
786# to be built before we can get TAGS.
787ctagsfiles1 = $(filter-out ${srcdir}/macuvs.h, $(wildcard ${srcdir}/*.[hc]))
676ctagsfiles2 = $(wildcard ${srcdir}/*.m) 788ctagsfiles2 = $(wildcard ${srcdir}/*.m)
789ctagsfiles3 = $(wildcard ${srcdir}/*.cc)
677 790
678## FIXME? In out-of-tree builds, should TAGS be generated in srcdir? 791## In out-of-tree builds, TAGS are generated in the build dir, like
792## other non-bootstrap build products (see Bug#31744).
679 793
680## This does not need to depend on ../lisp and ../lwlib TAGS files, 794## This does not need to depend on ../lisp, ../lwlib and ../lib TAGS files,
681## because etags "--include" only includes a pointer to the file, 795## because etags "--include" only includes a pointer to the file,
682## rather than the file contents. 796## rather than the file contents.
683TAGS: ${ETAGS} $(ctagsfiles1) $(ctagsfiles2) 797TAGS: ${ETAGS} $(ctagsfiles1) $(ctagsfiles2)
684 ${ETAGS} --include=../lisp/TAGS --include=$(lwlibdir)/TAGS \ 798 $(AM_V_GEN)${ETAGS} --include=../lisp/TAGS --include=$(lwlibdir)/TAGS \
799 --include=$(lib)/TAGS \
685 --regex='{c}/[ ]*DEFVAR_[A-Z_ (]+"\([^"]+\)"/\1/' \ 800 --regex='{c}/[ ]*DEFVAR_[A-Z_ (]+"\([^"]+\)"/\1/' \
686 --regex='{c}/[ ]*DEFVAR_[A-Z_ (]+"[^"]+",[ ]\([A-Za-z0-9_]+\)/\1/' \ 801 --regex='{c}/[ ]*DEFVAR_[A-Z_ (]+"[^"]+",[ ]\([A-Za-z0-9_]+\)/\1/' \
687 $(ctagsfiles1) \ 802 $(ctagsfiles1) \
688 --regex='{objc}/[ ]*DEFVAR_[A-Z_ (]+"\([^"]+\)"/\1/' \ 803 --regex='{objc}/[ ]*DEFVAR_[A-Z_ (]+"\([^"]+\)"/\1/' \
689 --regex='{objc}/[ ]*DEFVAR_[A-Z_ (]+"[^"]+",[ ]\([A-Za-z0-9_]+\)/\1/' \ 804 --regex='{objc}/[ ]*DEFVAR_[A-Z_ (]+"[^"]+",[ ]\([A-Za-z0-9_]+\)/\1/' \
690 $(ctagsfiles2) 805 $(ctagsfiles2) \
806 $(ctagsfiles3)
691 807
692## Arrange to make tags tables for ../lisp and ../lwlib, 808## Arrange to make tags tables for ../lisp, ../lwlib and ../lib,
693## which the above TAGS file for the C files includes by reference. 809## which the above TAGS file for the C files includes by reference.
694../lisp/TAGS: FORCE 810../lisp/TAGS $(lwlibdir)/TAGS $(lib)/TAGS: FORCE
695 $(MAKE) -C ../lisp TAGS ETAGS="$(ETAGS)" 811 $(MAKE) -C $(dir $@) $(notdir $@) ETAGS="$(ETAGS)"
696 812
697$(lwlibdir)/TAGS: FORCE 813tags: TAGS ../lisp/TAGS $(lwlibdir)/TAGS $(lib)/TAGS
698 $(MAKE) -C $(lwlibdir) TAGS ETAGS="$(ETAGS)"
699
700tags: TAGS ../lisp/TAGS $(lwlibdir)/TAGS
701.PHONY: tags 814.PHONY: tags
702 815
703 816
@@ -721,29 +834,91 @@ tags: TAGS ../lisp/TAGS $(lwlibdir)/TAGS
721## but now that we require GNU make, we can simply specify 834## but now that we require GNU make, we can simply specify
722## bootstrap-emacs$(EXEEXT) as an order-only prerequisite. 835## bootstrap-emacs$(EXEEXT) as an order-only prerequisite.
723 836
724%.elc: %.el | bootstrap-emacs$(EXEEXT) 837%.elc: %.el | bootstrap-emacs$(EXEEXT) $(bootstrap_pdmp)
725 @$(MAKE) -C ../lisp EMACS="$(bootstrap_exe)" THEFILE=$< $<c 838 @$(MAKE) $(AM_V_NO_PD) -C ../lisp EMACS="$(bootstrap_exe)"\
726 839 THEFILE=$< $<c
727## VCSWITNESS points to the file that holds info about the current checkout. 840
728## We use it as a heuristic to decide when to rebuild loaddefs.el. 841ifeq ($(HAVE_NATIVE_COMP):$(NATIVE_DISABLED),yes:)
729## If empty it is ignored; the parent makefile can set it to some other value. 842## The following rules are used only when building a source tarball
730VCSWITNESS = 843## for the first time, when the native-lisp/ directory doesn't yet
844## exist and needs to be created and populated with the preloaded
845## *.eln files.
846
847## List of *.eln files we need to produce in addition to the preloaded
848## ones in $(lisp).
849elnlisp := \
850 emacs-lisp/byte-opt.eln \
851 emacs-lisp/bytecomp.eln \
852 emacs-lisp/cconv.eln \
853 international/charscript.eln \
854 emacs-lisp/comp.eln \
855 emacs-lisp/comp-cstr.eln \
856 international/emoji-zwj.eln
857elnlisp := $(addprefix ${lispsource}/,${elnlisp}) $(lisp:.elc=.eln)
858
859%.eln: %.el | emacs$(EXEEXT) $(pdmp)
860 @$(MAKE) $(AM_V_NO_PD) -C ../lisp EMACS="../src/emacs$(EXEEXT)"\
861 THEFILE=$< $<n
862
863## FIXME: this is fragile! We lie to Make about the files produced by
864## this rule, and we rely on the absence of the native-lisp directory
865## to trigger it. This means that if anything goes wrong during
866## native compilation, the only way to trigger it again is to remove
867## the directory and re-native-compile everything. The main
868## underlying problem is that the name of the subdirectory of
869## native-lisp where the *.eln files will be produced, and the exact
870## names of those *.eln files, cannot be known in advance; we must ask
871## Emacs to produce them.
872../native-lisp: | $(pdmp)
873 @if test ! -d $@; then \
874 mkdir $@ && $(MAKE) $(AM_V_NO_PD) $(elnlisp); \
875 if test $(SYSTEM_TYPE) = cygwin; then \
876 find $@ -name '*.eln' | rebase -v -O -T -; \
877 fi; \
878 LC_ALL=C $(RUN_TEMACS) -batch $(BUILD_DETAILS) -l loadup --temacs=pdump \
879 --bin-dest $(BIN_DESTDIR) --eln-dest $(ELN_DESTDIR) \
880 && cp -f emacs$(EXEEXT) bootstrap-emacs$(EXEEXT) \
881 && cp -f $(pdmp) $(bootstrap_pdmp); \
882 fi
883endif
731 884
732$(lispsource)/loaddefs.el: $(VCSWITNESS) | bootstrap-emacs$(EXEEXT) 885$(lispsource)/loaddefs.el: | bootstrap-emacs$(EXEEXT) $(bootstrap_pdmp)
733 $(MAKE) -C ../lisp autoloads EMACS="$(bootstrap_exe)" 886 $(MAKE) -C ../lisp autoloads EMACS="$(bootstrap_exe)"
734 887
735## Dump an Emacs executable named bootstrap-emacs containing the 888## Dump an Emacs executable named bootstrap-emacs containing the
736## files from loadup.el in source form. 889## files from loadup.el in source form.
890
737bootstrap-emacs$(EXEEXT): temacs$(EXEEXT) 891bootstrap-emacs$(EXEEXT): temacs$(EXEEXT)
738 $(MAKE) -C ../lisp update-subdirs 892 $(MAKE) -C ../lisp update-subdirs
739ifeq ($(CANNOT_DUMP),yes) 893ifeq ($(DUMPING),unexec)
740 ln -f temacs$(EXEEXT) $@ 894 $(RUN_TEMACS) --batch $(BUILD_DETAILS) -l loadup --temacs=bootstrap
741else
742 $(RUN_TEMACS) --batch $(BUILD_DETAILS) --load loadup bootstrap
743 ifneq ($(PAXCTL_dumped),) 895 ifneq ($(PAXCTL_dumped),)
744 $(PAXCTL_dumped) emacs$(EXEEXT) 896 $(PAXCTL_dumped) emacs$(EXEEXT)
745 endif 897 endif
746 mv -f emacs$(EXEEXT) $@ 898 mv -f emacs$(EXEEXT) bootstrap-emacs$(EXEEXT)
899 @: Compile some files earlier to speed up further compilation.
900 $(MAKE) -C ../lisp compile-first EMACS="$(bootstrap_exe)"
901else
902 @: In the pdumper case, make compile-first after the dump
903 cp -f temacs$(EXEEXT) bootstrap-emacs$(EXEEXT)
904ifeq ($(DO_CODESIGN),yes)
905 codesign -s - -f bootstrap-emacs$(EXEEXT)
906endif
747endif 907endif
908
909ifeq ($(DUMPING),pdumper)
910$(bootstrap_pdmp): bootstrap-emacs$(EXEEXT)
911 rm -f $@
912 $(RUN_TEMACS) --batch $(BUILD_DETAILS) -l loadup --temacs=pbootstrap \
913 --bin-dest $(BIN_DESTDIR) --eln-dest $(ELN_DESTDIR)
748 @: Compile some files earlier to speed up further compilation. 914 @: Compile some files earlier to speed up further compilation.
915 @: First, byte compile these files, ....
916 ANCIENT=yes $(MAKE) -C ../lisp compile-first EMACS="$(bootstrap_exe)"
917 @: .... then use their .elcs in native compiling these and other files.
749 $(MAKE) -C ../lisp compile-first EMACS="$(bootstrap_exe)" 918 $(MAKE) -C ../lisp compile-first EMACS="$(bootstrap_exe)"
919endif
920
921### Flymake support (for C only)
922check-syntax:
923 $(AM_V_CC)$(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) ${CHK_SOURCES} || true
924.PHONY: check-syntax