summaryrefslogtreecommitdiff
path: root/src/Makefile.in
diff options
context:
space:
mode:
Diffstat (limited to 'src/Makefile.in')
-rw-r--r--src/Makefile.in148
1 files changed, 100 insertions, 48 deletions
diff --git a/src/Makefile.in b/src/Makefile.in
index a8fa5c372f4..512738840ea 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -1,6 +1,6 @@
### @configure_input@
-# Copyright (C) 1985, 1987-1988, 1993-1995, 1999-2018 Free Software
+# Copyright (C) 1985, 1987-1988, 1993-1995, 1999-2019 Free Software
# Foundation, Inc.
# This file is part of GNU Emacs.
@@ -54,8 +54,6 @@ lwlibdir = ../lwlib
# Configuration files for .o files to depend on.
config_h = config.h $(srcdir)/conf_post.h
-bootstrap_exe = ../src/bootstrap-emacs$(EXEEXT)
-
## ns-app if HAVE_NS, else empty.
OTHER_FILES = @OTHER_FILES@
@@ -127,7 +125,8 @@ LIBIMAGE=@LIBTIFF@ @LIBJPEG@ @LIBPNG@ @LIBGIF@ @LIBXPM@
XCB_LIBS=@XCB_LIBS@
XFT_LIBS=@XFT_LIBS@
-LIBX_EXTRA=-lX11 $(XCB_LIBS) $(XFT_LIBS)
+XRENDER_LIBS=@XRENDER_LIBS@
+LIBX_EXTRA=-lX11 $(XCB_LIBS) $(XFT_LIBS) $(XRENDER_LIBS)
FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@
FONTCONFIG_LIBS = @FONTCONFIG_LIBS@
@@ -333,7 +332,9 @@ BUILD_DETAILS = @BUILD_DETAILS@
UNEXEC_OBJ = @UNEXEC_OBJ@
-CANNOT_DUMP=@CANNOT_DUMP@
+DUMPING=@DUMPING@
+CHECK_STRUCTS = @CHECK_STRUCTS@
+HAVE_PDUMPER = @HAVE_PDUMPER@
# 'make' verbosity.
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
@@ -358,6 +359,15 @@ am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @
am__v_at_1 =
+bootstrap_exe = ../src/bootstrap-emacs$(EXEEXT)
+ifeq ($(DUMPING),pdumper)
+bootstrap_pdmp := bootstrap-emacs.pdmp # Keep in sync with loadup.el
+pdmp := emacs.pdmp
+else
+bootstrap_pdmp :=
+pdmp :=
+endif
+
# Flags that might be in WARN_CFLAGS but are not valid for Objective C.
NON_OBJC_CFLAGS = -Wignored-attributes -Wignored-qualifiers -Wopenmp-simd
@@ -396,7 +406,7 @@ base_obj = dispnew.o frame.o scroll.o xdisp.o menu.o $(XMENU_OBJ) window.o \
bignum.o buffer.o filelock.o insdel.o marker.o \
minibuf.o fileio.o dired.o \
cmds.o casetab.o casefiddle.o indent.o search.o regex-emacs.o undo.o \
- alloc.o data.o doc.o editfns.o callint.o \
+ alloc.o pdumper.o data.o doc.o editfns.o callint.o \
eval.o floatfns.o fns.o font.o print.o lread.o $(MODULES_OBJ) \
syntax.o $(UNEXEC_OBJ) bytecode.o \
process.o gnutls.o callproc.o \
@@ -447,9 +457,19 @@ FIRSTFILE_OBJ=@FIRSTFILE_OBJ@
ALLOBJS = $(FIRSTFILE_OBJ) $(VMLIMIT_OBJ) $(obj) $(otherobj)
# Must be first, before dep inclusion!
-all: emacs$(EXEEXT) $(OTHER_FILES)
+all: emacs$(EXEEXT) $(pdmp) $(OTHER_FILES)
.PHONY: all
+dmpstruct_headers=$(srcdir)/lisp.h $(srcdir)/buffer.h \
+ $(srcdir)/intervals.h $(srcdir)/charset.h $(srcdir)/bignum.h
+ifeq ($(CHECK_STRUCTS),true)
+pdumper.o: dmpstruct.h
+endif
+dmpstruct.h: $(srcdir)/dmpstruct.awk
+dmpstruct.h: $(libsrc)/make-fingerprint$(EXEEXT) $(dmpstruct_headers)
+ $(AM_V_GEN)POSIXLY_CORRECT=1 awk -f $(srcdir)/dmpstruct.awk \
+ $(dmpstruct_headers) > $@
+
AUTO_DEPEND = @AUTO_DEPEND@
DEPDIR = deps
ifeq ($(AUTO_DEPEND),yes)
@@ -507,12 +527,12 @@ LIBES = $(LIBS) $(W32_LIBS) $(LIBS_GNUSTEP) $(LIBX_BASE) $(LIBIMAGE) \
$(NOTIFY_LIBS) $(LIB_MATH) $(LIBZ) $(LIBMODULES) $(LIBSYSTEMD_LIBS) \
$(JSON_LIBS) $(GMP_LIB)
-## FORCE it so that admin/unidata can decide whether these files
-## are up-to-date. Although since charprop depends on bootstrap-emacs,
-## and emacs (which recreates bootstrap-emacs) depends on charprop,
-## in practice this rule was always run anyway.
-$(srcdir)/macuvs.h $(lispsource)/international/charprop.el: \
- bootstrap-emacs$(EXEEXT) FORCE
+## FORCE it so that admin/unidata can decide whether this file is
+## up-to-date. Although since charprop depends on bootstrap-emacs,
+## and emacs depends on charprop, in practice this rule was always run
+## anyway.
+$(lispsource)/international/charprop.el: \
+ FORCE | bootstrap-emacs$(EXEEXT) $(bootstrap_pdmp)
$(MAKE) -C ../admin/unidata all EMACS="../$(bootstrap_exe)"
## We require charprop.el to exist before ucs-normalize.el is
@@ -527,7 +547,7 @@ ${lispintdir}/cp51932.el ${lispintdir}/eucjp-ms.el: FORCE
charsets = ${top_srcdir}/admin/charsets/charsets.stamp
${charsets}: FORCE
- ${MAKE} -C ../admin/charsets all
+ $(MAKE) -C ../admin/charsets all
charscript = ${lispintdir}/charscript.el
${charscript}: FORCE
@@ -543,14 +563,20 @@ ${lispintdir}/characters.elc: ${charscript:.el=.elc}
emacs$(EXEEXT): temacs$(EXEEXT) \
lisp.mk $(etc)/DOC $(lisp) \
$(lispsource)/international/charprop.el ${charsets}
-ifeq ($(CANNOT_DUMP),yes)
- ln -f temacs$(EXEEXT) $@
-else
- LC_ALL=C $(RUN_TEMACS) -batch $(BUILD_DETAILS) -l loadup dump
+ifeq ($(DUMPING),unexec)
+ LC_ALL=C $(RUN_TEMACS) -batch $(BUILD_DETAILS) -l loadup --temacs=dump
ifneq ($(PAXCTL_dumped),)
- $(PAXCTL_dumped) $@
+ $(PAXCTL_dumped) emacs$(EXEEXT)
endif
- ln -f $@ bootstrap-emacs$(EXEEXT)
+ cp -f $@ bootstrap-emacs$(EXEEXT)
+else
+ rm -f $@ && cp -f temacs$(EXEEXT) $@
+endif
+
+ifeq ($(DUMPING),pdumper)
+$(pdmp): emacs$(EXEEXT)
+ LC_ALL=C $(RUN_TEMACS) -batch $(BUILD_DETAILS) -l loadup --temacs=pdump
+ cp -f $@ $(bootstrap_pdmp)
endif
## We run make-docfile twice because the command line may get too long
@@ -572,8 +598,9 @@ $(etc)/DOC: lisp.mk $(libsrc)/make-docfile$(EXEEXT) $(obj) $(lisp)
$(AM_V_at)$(libsrc)/make-docfile -a $(etc)/DOC -d $(lispsource) \
$(shortlisp)
-$(libsrc)/make-docfile$(EXEEXT): $(lib)/libgnu.a
- $(MAKE) -C $(libsrc) make-docfile$(EXEEXT)
+$(libsrc)/make-docfile$(EXEEXT) $(libsrc)/make-fingerprint$(EXEEXT): \
+ $(lib)/libgnu.a
+ $(MAKE) -C $(dir $@) $(notdir $@)
buildobj.h: Makefile
$(AM_V_GEN)for i in $(ALLOBJS); do \
@@ -601,18 +628,29 @@ $(ALLOBJS): globals.h
LIBEGNU_ARCHIVE = $(lib)/lib$(if $(HYBRID_MALLOC),e)gnu.a
$(LIBEGNU_ARCHIVE): $(config_h)
- $(MAKE) -C $(lib) all
+ $(MAKE) -C $(dir $@) all
+
+ifeq ($(HAVE_PDUMPER),yes)
+ MAKE_PDUMPER_FINGERPRINT = $(libsrc)/make-fingerprint$(EXEEXT)
+else
+ MAKE_PDUMPER_FINGERPRINT =
+endif
## We have to create $(etc) here because init_cmdargs tests its
## existence when setting Vinstallation_directory (FIXME?).
## This goes on to affect various things, and the emacs binary fails
## to start if Vinstallation_directory has the wrong value.
-temacs$(EXEEXT): $(LIBXMENU) $(ALLOBJS) \
- $(LIBEGNU_ARCHIVE) $(EMACSRES) ${charsets} ${charscript}
- $(AM_V_CCLD)$(CC) $(ALL_CFLAGS) $(TEMACS_LDFLAGS) $(LDFLAGS) \
- -o temacs $(ALLOBJS) $(LIBEGNU_ARCHIVE) $(W32_RES_LINK) $(LIBES)
+temacs$(EXEEXT): $(LIBXMENU) $(ALLOBJS) $(LIBEGNU_ARCHIVE) $(EMACSRES) \
+ $(charsets) $(charscript) $(MAKE_PDUMPER_FINGERPRINT)
+ $(AM_V_CCLD)$(CC) -o $@.tmp \
+ $(ALL_CFLAGS) $(TEMACS_LDFLAGS) $(LDFLAGS) \
+ $(ALLOBJS) $(LIBEGNU_ARCHIVE) $(W32_RES_LINK) $(LIBES)
+ifeq ($(HAVE_PDUMPER),yes)
+ $(AM_V_at)$(MAKE_PDUMPER_FINGERPRINT) $@.tmp
+endif
+ $(AM_V_at)mv $@.tmp $@
$(MKDIR_P) $(etc)
-ifneq ($(CANNOT_DUMP),yes)
+ifeq ($(DUMPING),unexec)
ifneq ($(PAXCTL_notdumped),)
$(PAXCTL_notdumped) $@
endif
@@ -621,15 +659,15 @@ endif
## The following oldxmenu-related rules are only (possibly) used if
## HAVE_X11 && !USE_GTK, but there is no harm in always defining them.
$(lwlibdir)/liblw.a: $(config_h) globals.h lisp.h FORCE
- $(MAKE) -C $(lwlibdir) liblw.a
+ $(MAKE) -C $(dir $@) $(notdir $@)
$(oldXMenudir)/libXMenu11.a: FORCE
- $(MAKE) -C $(oldXMenudir) libXMenu11.a
+ $(MAKE) -C $(dir $@) $(notdir $@)
FORCE:
.PHONY: FORCE
.PRECIOUS: ../config.status Makefile
../config.status: $(top_srcdir)/configure.ac $(top_srcdir)/m4/*.m4
- $(MAKE) -C .. $(notdir $@)
+ $(MAKE) -C $(dir $@) $(notdir $@)
Makefile: ../config.status $(srcdir)/Makefile.in
$(MAKE) -C .. src/$@
@@ -639,7 +677,7 @@ emacs.res: FORCE
$(MAKE) -C ../nt ../src/emacs.res
.PHONY: ns-app
-ns-app: emacs$(EXEEXT)
+ns-app: emacs$(EXEEXT) $(pdmp)
$(MAKE) -C ../nextstep all
.PHONY: mostlyclean clean bootstrap-clean distclean maintainer-clean
@@ -647,13 +685,17 @@ ns-app: emacs$(EXEEXT)
mostlyclean:
rm -f temacs$(EXEEXT) core ./*.core \#* ./*.o
+ rm -f dmpstruct.h
+ rm -f emacs.pdmp
rm -f ../etc/DOC
- rm -f bootstrap-emacs$(EXEEXT) emacs-$(version)$(EXEEXT)
+ rm -f bootstrap-emacs$(EXEEXT) $(bootstrap_pdmp)
+ rm -f emacs-$(version)$(EXEEXT)
rm -f buildobj.h
rm -f globals.h gl-stamp
rm -f ./*.res ./*.tmp
clean: mostlyclean
- rm -f emacs-*.*.*[0-9]$(EXEEXT) emacs$(EXEEXT) $(DEPDIR)/*
+ rm -f emacs-*.*.*[0-9]$(EXEEXT) emacs-*.*.*[0-9].pdmp
+ rm -f emacs$(EXEEXT) $(DEPDIR)/*
## bootstrap-clean is used to clean up just before a bootstrap.
## It should remove all files generated during a compilation/bootstrap,
@@ -681,9 +723,11 @@ extraclean: distclean
ETAGS = ../lib-src/etags${EXEEXT}
${ETAGS}: FORCE
- ${MAKE} -C ../lib-src $(notdir $@)
+ $(MAKE) -C $(dir $@) $(notdir $@)
-ctagsfiles1 = $(wildcard ${srcdir}/*.[hc])
+# Remove macuvs.h since it'd cause `src/emacs`
+# to be built before we can get TAGS.
+ctagsfiles1 = $(filter-out ${srcdir}/macuvs.h, $(wildcard ${srcdir}/*.[hc]))
ctagsfiles2 = $(wildcard ${srcdir}/*.m)
## In out-of-tree builds, TAGS are generated in the build dir, like
@@ -703,11 +747,8 @@ TAGS: ${ETAGS} $(ctagsfiles1) $(ctagsfiles2)
## Arrange to make tags tables for ../lisp and ../lwlib,
## which the above TAGS file for the C files includes by reference.
-../lisp/TAGS: FORCE
- $(MAKE) -C ../lisp TAGS ETAGS="$(ETAGS)"
-
-$(lwlibdir)/TAGS: FORCE
- $(MAKE) -C $(lwlibdir) TAGS ETAGS="$(ETAGS)"
+../lisp/TAGS $(lwlibdir)/TAGS: FORCE
+ $(MAKE) -C $(dir $@) $(notdir $@) ETAGS="$(ETAGS)"
tags: TAGS ../lisp/TAGS $(lwlibdir)/TAGS
.PHONY: tags
@@ -733,7 +774,7 @@ tags: TAGS ../lisp/TAGS $(lwlibdir)/TAGS
## but now that we require GNU make, we can simply specify
## bootstrap-emacs$(EXEEXT) as an order-only prerequisite.
-%.elc: %.el | bootstrap-emacs$(EXEEXT)
+%.elc: %.el | bootstrap-emacs$(EXEEXT) $(bootstrap_pdmp)
@$(MAKE) -C ../lisp EMACS="$(bootstrap_exe)" THEFILE=$< $<c
## VCSWITNESS points to the file that holds info about the current checkout.
@@ -741,24 +782,35 @@ tags: TAGS ../lisp/TAGS $(lwlibdir)/TAGS
## If empty it is ignored; the parent makefile can set it to some other value.
VCSWITNESS =
-$(lispsource)/loaddefs.el: $(VCSWITNESS) | bootstrap-emacs$(EXEEXT)
+$(lispsource)/loaddefs.el: $(VCSWITNESS) | \
+ bootstrap-emacs$(EXEEXT) $(bootstrap_pdmp)
$(MAKE) -C ../lisp autoloads EMACS="$(bootstrap_exe)"
## Dump an Emacs executable named bootstrap-emacs containing the
## files from loadup.el in source form.
+
bootstrap-emacs$(EXEEXT): temacs$(EXEEXT)
$(MAKE) -C ../lisp update-subdirs
-ifeq ($(CANNOT_DUMP),yes)
- ln -f temacs$(EXEEXT) $@
-else
- $(RUN_TEMACS) --batch $(BUILD_DETAILS) --load loadup bootstrap
+ifeq ($(DUMPING),unexec)
+ $(RUN_TEMACS) --batch $(BUILD_DETAILS) -l loadup --temacs=bootstrap
ifneq ($(PAXCTL_dumped),)
$(PAXCTL_dumped) emacs$(EXEEXT)
endif
- mv -f emacs$(EXEEXT) $@
+ mv -f emacs$(EXEEXT) bootstrap-emacs$(EXEEXT)
+ @: Compile some files earlier to speed up further compilation.
+ $(MAKE) -C ../lisp compile-first EMACS="$(bootstrap_exe)"
+else
+ @: In the pdumper case, make compile-first after the dump
+ cp -f temacs$(EXEEXT) bootstrap-emacs$(EXEEXT)
endif
+
+ifeq ($(DUMPING),pdumper)
+$(bootstrap_pdmp): bootstrap-emacs$(EXEEXT)
+ rm -f $@
+ $(RUN_TEMACS) --batch $(BUILD_DETAILS) -l loadup --temacs=pbootstrap
@: Compile some files earlier to speed up further compilation.
$(MAKE) -C ../lisp compile-first EMACS="$(bootstrap_exe)"
+endif
### Flymake support (for C only)
check-syntax: