### @configure_input@
-# Copyright (C) 1985, 1987-1988, 1993-1995, 1999-2015 Free Software
+# Copyright (C) 1985, 1987-1988, 1993-1995, 1999-2016 Free Software
# Foundation, Inc.
# This file is part of GNU Emacs.
LIBIMAGE=@LIBTIFF@ @LIBJPEG@ @LIBPNG@ @LIBGIF@ @LIBXPM@
+XCB_LIBS=@XCB_LIBS@
XFT_LIBS=@XFT_LIBS@
-LIBX_EXTRA=-lX11 $(XFT_LIBS)
+LIBX_EXTRA=-lX11 $(XCB_LIBS) $(XFT_LIBS)
FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@
FONTCONFIG_LIBS = @FONTCONFIG_LIBS@
LIBZ = @LIBZ@
+## system-specific libs for dynamic modules, else empty
+LIBMODULES = @LIBMODULES@
+## dynlib.o emacs-module.o if modules enabled, else empty
+MODULES_OBJ = @MODULES_OBJ@
+
XRANDR_LIBS = @XRANDR_LIBS@
XRANDR_CFLAGS = @XRANDR_CFLAGS@
minibuf.o fileio.o dired.o \
cmds.o casetab.o casefiddle.o indent.o search.o regex.o undo.o \
alloc.o data.o doc.o editfns.o callint.o \
- eval.o floatfns.o fns.o font.o print.o lread.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 \
region-cache.o sound.o atimer.o \
FIRSTFILE_OBJ=@FIRSTFILE_OBJ@
ALLOBJS = $(FIRSTFILE_OBJ) $(VMLIMIT_OBJ) $(obj) $(otherobj)
+all: emacs$(EXEEXT) $(OTHER_FILES)
+.PHONY: all
+
## This is the list of all Lisp files that might be loaded into the
## dumped Emacs. Some of them are not loaded on all platforms, but
## the DOC file on every platform uses them (because the DOC file is
shortlisp =
lisp.mk: $(lispsource)/loadup.el
@rm -f $@
- ${AM_V_GEN}( echo "shortlisp = \\"; \
+ ${AM_V_GEN}( printf 'shortlisp = \\\n'; \
sed -n 's/^[ \t]*(load "\([^"]*\)".*/\1/p' $< | \
sed -e 's/$$/.elc \\/' -e 's/\.el\.elc/.el/'; \
echo "" ) > $@
$(LIBS_TERMCAP) $(GETLOADAVG_LIBS) $(SETTINGS_LIBS) $(LIBSELINUX_LIBS) \
$(FREETYPE_LIBS) $(FONTCONFIG_LIBS) $(LIBOTF_LIBS) $(M17N_FLT_LIBS) \
$(LIBGNUTLS_LIBS) $(LIB_PTHREAD) \
- $(GFILENOTIFY_LIBS) $(LIB_MATH) $(LIBZ)
-
-all: emacs$(EXEEXT) $(OTHER_FILES)
-.PHONY: all
+ $(GFILENOTIFY_LIBS) $(LIB_MATH) $(LIBZ) $(LIBMODULES)
$(leimdir)/leim-list.el: bootstrap-emacs$(EXEEXT)
$(MAKE) -C ../leim leim-list.el EMACS="$(bootstrap_exe)"
bootstrap-emacs$(EXEEXT) FORCE
$(MAKE) -C ../admin/unidata all EMACS="../$(bootstrap_exe)"
+## We require charprop.el to exist before ucs-normalize.el is
+## byte-compiled, because ucs-normalize.el needs to load 2 uni-*.el files.
+$(lispsource)/international/ucs-normalize.elc: | \
+ $(lispsource)/international/charprop.el
+
+lispintdir = ${lispsource}/international
+${lispintdir}/cp51932.el ${lispintdir}/eucjp-ms.el: FORCE
+ ${MAKE} -C ../admin/charsets $(notdir $@)
+
+charsets = ${top_srcdir}/admin/charsets/charsets.stamp
+${charsets}: FORCE
+ ${MAKE} -C ../admin/charsets all
+
+charscript = ${lispintdir}/charscript.el
+${charscript}: FORCE
+ $(MAKE) -C ../admin/unidata $(notdir $@)
+
+${lispintdir}/characters.elc: ${charscript:.el=.elc}
+
## The dumped Emacs is as functional and more efficient than
## bootstrap-emacs, so we replace the latter with the former.
## Strictly speaking, emacs does not depend directly on all of $lisp,
## on all of $lisp, and emacs depends on DOC, so it is ok to use $lisp here.
emacs$(EXEEXT): temacs$(EXEEXT) \
lisp.mk $(etc)/DOC $(lisp) $(leimdir)/leim-list.el \
- $(lispsource)/international/charprop.el
+ $(lispsource)/international/charprop.el ${charsets}
ifeq ($(CANNOT_DUMP),yes)
ln -f temacs$(EXEEXT) $@
else
$(AM_V_at)$(libsrc)/make-docfile -a $(etc)/DOC -d $(lispsource) \
$(shortlisp)
-$(libsrc)/make-docfile$(EXEEXT):
+$(libsrc)/make-docfile$(EXEEXT): $(lib)/libgnu.a
$(MAKE) -C $(libsrc) make-docfile$(EXEEXT)
buildobj.h: Makefile
$(ALLOBJS): globals.h
$(lib)/libgnu.a: $(config_h)
- $(MAKE) -C $(lib) libgnu.a
+ $(MAKE) -C $(lib) all
## 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) \
- $(lib)/libgnu.a $(EMACSRES)
+ $(lib)/libgnu.a $(EMACSRES) ${charsets} ${charscript}
$(AM_V_CCLD)$(CC) $(ALL_CFLAGS) $(TEMACS_LDFLAGS) $(LDFLAGS) \
-o temacs $(ALLOBJS) $(lib)/libgnu.a $(W32_RES_LINK) $(LIBES)
$(MKDIR_P) $(etc)