X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/81deba3d7a2b187d58fe26bd8b4eafb5687095e1..edae7d93ed509aa8a7db3952c70550cf3353d169:/src/Makefile.in diff --git a/src/Makefile.in b/src/Makefile.in index 32615c848a..d54670932d 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -1,6 +1,6 @@ ### @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. @@ -114,8 +114,9 @@ TEMACS_LDFLAGS = $(LD_SWITCH_SYSTEM) $(LD_SWITCH_SYSTEM_TEMACS) ## around this, newer ones setfattr. See Bug#11398 and Bug#16343. PAXCTL = @PAXCTL@ SETFATTR = @SETFATTR@ -PAXCTL_if_present = $(or $(PAXCTL),: paxctl) -SETFATTR_if_present = $(or $(SETFATTR),: setfattr) +## Commands to set PaX flags on dumped and not-dumped instances of Emacs. +PAXCTL_dumped = @PAXCTL_dumped@ +PAXCTL_notdumped = @PAXCTL_notdumped@ ## Some systems define this to request special libraries. LIBS_SYSTEM=@LIBS_SYSTEM@ @@ -128,8 +129,9 @@ LIB_PTHREAD=@LIB_PTHREAD@ 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@ @@ -151,6 +153,9 @@ DBUS_LIBS = @DBUS_LIBS@ ## dbusbind.o if HAVE_DBUS, else empty. DBUS_OBJ = @DBUS_OBJ@ +## xwidgets.o if HAVE_XWIDGETS, else empty. +XWIDGETS_OBJ = @XWIDGETS_OBJ@ + LIB_EXECINFO=@LIB_EXECINFO@ SETTINGS_CFLAGS = @SETTINGS_CFLAGS@ @@ -159,12 +164,13 @@ SETTINGS_LIBS = @SETTINGS_LIBS@ ## gtkutil.o if USE_GTK, else empty. GTK_OBJ=@GTK_OBJ@ -## gfilenotify.o if HAVE_GFILENOTIFY. ## inotify.o if HAVE_INOTIFY. +## kqueue.o if HAVE_KQUEUE. +## gfilenotify.o if HAVE_GFILENOTIFY. ## w32notify.o if HAVE_W32NOTIFY. NOTIFY_OBJ = @NOTIFY_OBJ@ -GFILENOTIFY_CFLAGS = @GFILENOTIFY_CFLAGS@ -GFILENOTIFY_LIBS = @GFILENOTIFY_LIBS@ +NOTIFY_CFLAGS = @NOTIFY_CFLAGS@ +NOTIFY_LIBS = @NOTIFY_LIBS@ ## -ltermcap, or -lncurses, or -lcurses, or "". LIBS_TERMCAP=@LIBS_TERMCAP@ @@ -209,8 +215,8 @@ LIBX_OTHER=@LIBX_OTHER@ ## configure, which should set it to nil in non-X builds. LIBX_BASE=$(LIBXMENU) $(LD_SWITCH_X_SITE) -## Only used for GNUstep -LIBS_GNUSTEP=@LIBS_GNUSTEP@ +## Used only for GNUstep. +LIBS_GNUSTEP=$(patsubst -specs=%-hardened-ld,,@LIBS_GNUSTEP@) LIBSOUND= @LIBSOUND@ CFLAGS_SOUND= @CFLAGS_SOUND@ @@ -218,6 +224,12 @@ CFLAGS_SOUND= @CFLAGS_SOUND@ RSVG_LIBS= @RSVG_LIBS@ RSVG_CFLAGS= @RSVG_CFLAGS@ +WEBKIT_LIBS= @WEBKIT_LIBS@ +WEBKIT_CFLAGS= @WEBKIT_CFLAGS@ + +CAIRO_LIBS= @CAIRO_LIBS@ +CAIRO_CFLAGS= @CAIRO_CFLAGS@ + IMAGEMAGICK_LIBS= @IMAGEMAGICK_LIBS@ IMAGEMAGICK_CFLAGS= @IMAGEMAGICK_CFLAGS@ @@ -226,6 +238,11 @@ LIBXML2_CFLAGS = @LIBXML2_CFLAGS@ 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@ @@ -252,8 +269,8 @@ MSDOS_X_OBJ = NS_OBJ=@NS_OBJ@ ## nsterm.o nsfns.o nsmenu.o nsselect.o nsimage.o ns_fontfile if HAVE_NS. NS_OBJC_OBJ=@NS_OBJC_OBJ@ -## Only set if NS_IMPL_GNUSTEP. -GNU_OBJC_CFLAGS=@GNU_OBJC_CFLAGS@ +## Used only for GNUstep. +GNU_OBJC_CFLAGS=$(patsubst -specs=%-hardened-cc1,,@GNU_OBJC_CFLAGS@) ## w32fns.o w32menu.c w32reg.o fringe.o fontset.o w32font.o w32term.o ## w32xfns.o w32select.o image.o w32uniscribe.o if HAVE_W32, else ## empty. @@ -273,6 +290,7 @@ W32_RES_LINK=@W32_RES_LINK@ ## Empty if !HAVE_X_WINDOWS ## xfont.o ftfont.o xftfont.o ftxfont.o if HAVE_XFT ## xfont.o ftfont.o ftxfont.o if HAVE_FREETYPE +## ftfont.o ftcrfont.o if USE_CAIRO ## else xfont.o FONT_OBJ=@FONT_OBJ@ @@ -323,10 +341,15 @@ am__v_at_0 = @ am__v_at_1 = DEPDIR=deps -## -MMD -MF $(DEPDIR)/$*.d if AUTO_DEPEND; else empty. -DEPFLAGS=@DEPFLAGS@ -## ${MKDIR_P} ${DEPDIR} (if AUTO_DEPEND); else ':'. -MKDEPDIR=@MKDEPDIR@ +AUTO_DEPEND = @AUTO_DEPEND@ + +ifeq ($(AUTO_DEPEND),yes) +DEPFLAGS = -MMD -MF ${DEPDIR}/$*.d -MP +MKDEPDIR = ${MKDIR_P} ${DEPDIR} +else +DEPFLAGS = +MKDEPDIR = : +endif ## DO NOT use -R. There is a special hack described in lastfile.c ## which is used instead. Some initialized data areas are modified @@ -343,9 +366,10 @@ ALL_CFLAGS=-Demacs $(MYCPPFLAGS) -I. -I$(srcdir) \ $(GNUSTEP_CFLAGS) $(CFLAGS_SOUND) $(RSVG_CFLAGS) $(IMAGEMAGICK_CFLAGS) \ $(PNG_CFLAGS) $(LIBXML2_CFLAGS) $(DBUS_CFLAGS) \ $(XRANDR_CFLAGS) $(XINERAMA_CFLAGS) $(XFIXES_CFLAGS) \ + $(WEBKIT_CFLAGS) \ $(SETTINGS_CFLAGS) $(FREETYPE_CFLAGS) $(FONTCONFIG_CFLAGS) \ $(LIBOTF_CFLAGS) $(M17N_FLT_CFLAGS) $(DEPFLAGS) \ - $(LIBGNUTLS_CFLAGS) $(GFILENOTIFY_CFLAGS) \ + $(LIBGNUTLS_CFLAGS) $(NOTIFY_CFLAGS) $(CAIRO_CFLAGS) \ $(WARN_CFLAGS) $(WERROR_CFLAGS) $(CFLAGS) ALL_OBJC_CFLAGS=$(ALL_CFLAGS) $(GNU_OBJC_CFLAGS) @@ -367,11 +391,12 @@ base_obj = dispnew.o frame.o scroll.o xdisp.o menu.o $(XMENU_OBJ) window.o \ 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 \ doprnt.o intervals.o textprop.o composite.o xml.o $(NOTIFY_OBJ) \ + $(XWIDGETS_OBJ) \ profiler.o decompress.o \ $(MSDOS_OBJ) $(MSDOS_X_OBJ) $(NS_OBJ) $(CYGWIN_OBJ) $(FONT_OBJ) \ $(W32_OBJ) $(WINDOW_SYSTEM_OBJ) $(XGSELOBJ) @@ -413,24 +438,53 @@ otherobj= $(TERMCAP_OBJ) $(PRE_ALLOC_OBJ) $(GMALLOC_OBJ) $(RALLOC_OBJ) \ FIRSTFILE_OBJ=@FIRSTFILE_OBJ@ ALLOBJS = $(FIRSTFILE_OBJ) $(VMLIMIT_OBJ) $(obj) $(otherobj) -## Configure inserts the file lisp.mk at this point, defining $lisp. -@lisp_frag@ +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 +## supposed to be platform-independent). +## Note that this list should not include lisp files which might not +## be present, like site-load.el and site-init.el; this makefile +## expects them all to be either present or buildable. +## +## To generate this list from loadup.el, we can either: +## 1) Extract everything matching (load "..."), in which case +## we need to add charprop.el by hand; or +## 2) Extract everything matching (load "...", in which case +## we need to remove leim-list, site-init, and site-load by hand. +## There's not much to choose between these two approaches, +## but the second one seems like it could be more future-proof. +shortlisp = +lisp.mk: $(lispsource)/loadup.el + @rm -f $@ + ${AM_V_GEN}( printf 'shortlisp = \\\n'; \ + sed -n 's/^[ \t]*(load "\([^"]*\)".*/\1/p' $< | \ + sed -e 's/$$/.elc \\/' -e 's/\.el\.elc/.el/'; \ + echo "" ) > $@ + +-include lisp.mk +shortlisp_filter = leim/leim-list.el site-load.elc site-init.elc +shortlisp := $(filter-out ${shortlisp_filter},${shortlisp}) +## Place loaddefs.el first, so it gets generated first, since it is on +## the critical path (relevant in parallel compilations). +## We don't really need to sort, but may as well use it to remove duplicates. +shortlisp := loaddefs.el loadup.el $(sort ${shortlisp}) +lisp = $(addprefix ${lispsource}/,${shortlisp}) ## Construct full set of libraries to be linked. LIBES = $(LIBS) $(W32_LIBS) $(LIBS_GNUSTEP) $(LIBX_BASE) $(LIBIMAGE) \ $(LIBX_OTHER) $(LIBSOUND) \ $(RSVG_LIBS) $(IMAGEMAGICK_LIBS) $(LIB_ACL) $(LIB_CLOCK_GETTIME) \ + $(WEBKIT_LIBS) \ $(LIB_EACCESS) $(LIB_FDATASYNC) $(LIB_TIMER_TIME) $(DBUS_LIBS) \ $(LIB_EXECINFO) $(XRANDR_LIBS) $(XINERAMA_LIBS) $(XFIXES_LIBS) \ - $(LIBXML2_LIBS) $(LIBGPM) $(LIBRESOLV) $(LIBS_SYSTEM) \ + $(LIBXML2_LIBS) $(LIBGPM) $(LIBRESOLV) $(LIBS_SYSTEM) $(CAIRO_LIBS) \ $(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 + $(NOTIFY_LIBS) $(LIB_MATH) $(LIBZ) $(LIBMODULES) $(leimdir)/leim-list.el: bootstrap-emacs$(EXEEXT) $(MAKE) -C ../leim leim-list.el EMACS="$(bootstrap_exe)" @@ -443,29 +497,52 @@ $(srcdir)/macuvs.h $(lispsource)/international/charprop.el: \ 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 + +## ns-win.el loads ucs-normalize, so it also needs the above-mentioned +## 2 uni-*.el files to exist. +$(lispsource)/term/ns-win.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, ## since not all pieces are used on all platforms. But DOC depends ## on all of $lisp, and emacs depends on DOC, so it is ok to use $lisp here. emacs$(EXEEXT): temacs$(EXEEXT) \ - $(etc)/DOC $(lisp) $(leimdir)/leim-list.el \ - $(lispsource)/international/charprop.el + lisp.mk $(etc)/DOC $(lisp) $(leimdir)/leim-list.el \ + $(lispsource)/international/charprop.el ${charsets} ifeq ($(CANNOT_DUMP),yes) ln -f temacs$(EXEEXT) $@ else LC_ALL=C $(RUN_TEMACS) -batch -l loadup dump - $(PAXCTL_if_present) -zex $@ + ifneq ($(PAXCTL_dumped),) + $(PAXCTL_dumped) $@ + endif ln -f $@ bootstrap-emacs$(EXEEXT) endif ## We run make-docfile twice because the command line may get too long -## on some systems. The sed command operating on lisp.mk also reduces -## the length of the command line. Unfortunately, no-one has any idea +## on some systems. Unfortunately, no-one has any idea ## exactly how long the maximum safe command line length is on all the -## various systems that Emacs supports. Obviously, the length depends -## on what your value of $srcdir is. If the length restriction goes -## away, lisp.mk can be merged back into this file. +## various systems that Emacs supports. ## ## $(SOME_MACHINE_OBJECTS) comes before $(obj) because some files may ## or may not be included in $(obj), but they are always included in @@ -473,16 +550,15 @@ endif ## for the first time, this prevents any variation between configurations ## in the contents of the DOC file. ## -$(etc)/DOC: $(libsrc)/make-docfile$(EXEEXT) $(obj) $(lisp) +$(etc)/DOC: lisp.mk $(libsrc)/make-docfile$(EXEEXT) $(obj) $(lisp) $(AM_V_GEN)$(MKDIR_P) $(etc) -$(AM_V_at)rm -f $(etc)/DOC $(AM_V_at)$(libsrc)/make-docfile -d $(srcdir) \ $(SOME_MACHINE_OBJECTS) $(obj) > $(etc)/DOC $(AM_V_at)$(libsrc)/make-docfile -a $(etc)/DOC -d $(lispsource) \ - `sed -n -e 's| \\\\||' -e 's|^[ ]*$$(lispsource)/||p' \ - $(srcdir)/lisp.mk` + $(shortlisp) -$(libsrc)/make-docfile$(EXEEXT): +$(libsrc)/make-docfile$(EXEEXT): $(lib)/libgnu.a $(MAKE) -C $(libsrc) make-docfile$(EXEEXT) buildobj.h: Makefile @@ -509,20 +585,21 @@ globals.h: gl-stamp; @true $(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) ifneq ($(CANNOT_DUMP),yes) - $(PAXCTL_if_present) -r $@ - $(SETFATTR_if_present) -n user.pax.flags -v er $@ + ifneq ($(PAXCTL_notdumped),) + $(PAXCTL_notdumped) $@ + endif endif ## The following oldxmenu-related rules are only (possibly) used if @@ -580,7 +657,7 @@ bootstrap-clean: clean fi distclean: bootstrap-clean - rm -f Makefile + rm -f Makefile lisp.mk maintainer-clean: distclean rm -f TAGS @@ -603,9 +680,11 @@ ctagsfiles3 = [a-zA-Z]*.m ## rather than the file contents. TAGS: $(srcdir)/$(ctagsfiles1) $(srcdir)/$(ctagsfiles2) $(srcdir)/$(ctagsfiles3) "$(ETAGS)" --include=../lisp/TAGS --include=$(lwlibdir)/TAGS \ - --regex='{c}/[ ]*DEFVAR_[A-Z_ (]+"\([^"]+\)"/' \ + --regex='{c}/[ ]*DEFVAR_[A-Z_ (]+"\([^"]+\)"/\1/' \ + --regex='{c}/[ ]*DEFVAR_[A-Z_ (]+"[^"]+",[ ]\([A-Za-z0-9_]+\)/\1/' \ $(srcdir)/$(ctagsfiles1) $(srcdir)/$(ctagsfiles2) \ - --regex='{objc}/[ ]*DEFVAR_[A-Z_ (]+"\([^"]+\)"/' \ + --regex='{objc}/[ ]*DEFVAR_[A-Z_ (]+"\([^"]+\)"/\1/' \ + --regex='{objc}/[ ]*DEFVAR_[A-Z_ (]+"[^"]+",[ ]\([A-Za-z0-9_]+\)/\1/' \ $(srcdir)/$(ctagsfiles3) ## Arrange to make tags tables for ../lisp and ../lwlib, @@ -659,14 +738,18 @@ ifeq ($(CANNOT_DUMP),yes) ln -f temacs$(EXEEXT) $@ else $(RUN_TEMACS) --batch --load loadup bootstrap - $(PAXCTL_if_present) -zex emacs$(EXEEXT) + ifneq ($(PAXCTL_dumped),) + $(PAXCTL_dumped) emacs$(EXEEXT) + endif mv -f emacs$(EXEEXT) $@ endif @: Compile some files earlier to speed up further compilation. $(MAKE) -C ../lisp compile-first EMACS="$(bootstrap_exe)" -## Insert either autodeps.mk (if AUTO_DEPEND), else deps.mk. -@deps_frag@ - +ifeq ($(AUTO_DEPEND),yes) +-include $(ALLOBJS:%.o=${DEPDIR}/%.d) +else +include $(srcdir)/deps.mk +endif ### Makefile.in ends here