# 'make' verbosity.
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AM_V_ELN = $(am__v_ELN_@AM_V@)
+am__v_ELN_ = $(am__v_ELN_@AM_DEFAULT_V@)
+am__v_ELN_0 = @echo " ELN " $@;
+am__v_ELN_1 =
+
AM_V_ELC = $(am__v_ELC_@AM_V@)
am__v_ELC_ = $(am__v_ELC_@AM_DEFAULT_V@)
am__v_ELC_0 = @echo " ELC " $@;
$(lisp)/emacs-lisp/cconv.elc \
$(lisp)/emacs-lisp/byte-opt.elc \
$(lisp)/emacs-lisp/bytecomp.elc \
- $(lisp)/emacs-lisp/autoload.elc
+ $(lisp)/emacs-lisp/autoload.elc \
+ $(lisp)/emacs-lisp/comp.elc
# Files to compile early in compile-main. Works around bug#25556.
MAIN_FIRST = ./emacs-lisp/eieio.el ./emacs-lisp/eieio-base.el \
# cus-load and finder-inf are not explicitly requested by anything, so
# we add them here to make sure they get built.
-all: compile-main $(lisp)/cus-load.el $(lisp)/finder-inf.el
+all: compile-main compile-native-main $(lisp)/cus-load.el $(lisp)/finder-inf.el
PHONY_EXTRAS =
.PHONY: all custom-deps finder-data autoloads update-subdirs $(PHONY_EXTRAS)
-l bytecomp -f byte-compile-refresh-preloaded \
-f batch-byte-compile $(THEFILE)
+THEFILE = no-such-file
+.PHONY: $(THEFILE)n
+$(THEFILE)n:
+ $(AM_V_ELN)$(emacs) $(BYTE_COMPILE_FLAGS) \
+ -l comp -f byte-compile-refresh-preloaded \
+ -f batch-native-compile $(THEFILE)
+
# Files MUST be compiled one by one. If we compile several files in a
# row (i.e., in the same instance of Emacs) we can't make sure that
# the compilation environment is clean. We also set the load-path of
# subdirectories, to make sure require's and load's in the files being
# compiled find the right files.
-.SUFFIXES: .elc .el
+.SUFFIXES: .eln .elc .el
# An old-fashioned suffix rule, which, according to the GNU Make manual,
# cannot have prerequisites.
.el.elc:
$(AM_V_ELC)$(emacs) $(BYTE_COMPILE_FLAGS) -f batch-byte-compile $<
+.el.eln:
+ $(AM_V_ELN)$(emacs) $(BYTE_COMPILE_FLAGS) -f batch-native-compile $<
+
.PHONY: compile-first compile-main compile compile-always
compile-first: $(COMPILE_FIRST)
$(MAKE) compile-targets TARGETS="$$chunk"; \
done
+# Obsiusly copy pasted from above. Just do it on elns + ignoring errors...
+compile-native-main: gen-lisp compile-clean
+ @(cd $(lisp) && \
+ els=`echo "${SUBDIRS_REL} " | sed -e 's|/\./|/|g' -e 's|/\. | |g' -e 's| |/*.el |g'`; \
+ for el in ${MAIN_FIRST} $$els; do \
+ test -f $$el || continue; \
+ test ! -f $${el}c && \
+ GREP_OPTIONS= grep '^;.*[^a-zA-Z]no-byte-compile: *t' $$el > /dev/null && \
+ continue; \
+ echo "$${el}n"; \
+ done | xargs $(XARGS_LIMIT) echo) | \
+ while read chunk; do \
+ $(MAKE) -i compile-targets TARGETS="$$chunk"; \
+ done
+
.PHONY: compile-clean
# Erase left-over .elc files that do not have a corresponding .el file.
compile-clean:
if test -f "$$el" || test ! -f "$${el}c"; then :; else \
echo rm "$${el}c"; \
rm "$${el}c"; \
+ echo rm "$${el}n"; \
+ rm "$${el}n"; \
fi; \
done
# Calling make recursively because suffix rule cannot have prerequisites.
compile: $(LOADDEFS) autoloads compile-first
$(MAKE) compile-main
+# Ignore error for now cause we can't compile dynamic code
+ $(MAKE) -i compile-native-main
# Compile all Lisp files. This is like 'compile' but compiles files
# unconditionally. Some files don't actually get compiled because they
sed -e 's/$$/.elc \\/' -e 's/\.el\.elc/.el/'; \
echo "" ) > $@
+shortnativelisp =
+native_lisp.mk: $(lispsource)/loadup.el
+ @rm -f $@
+ ${AM_V_GEN}( printf 'shortnativelisp = \\\n'; \
+ sed -n 's/^[ \t]*(load "\([^"]*\)".*/\1/p' $< | \
+ sed -e 's/$$/.eln \\/' -e 's/\.el\.eln/.el/'; \
+ echo "" ) > $@
+
-include lisp.mk
+-include native_lisp.mk
shortlisp_filter = leim/leim-list.el site-load.elc site-init.elc
shortlisp := $(filter-out ${shortlisp_filter},${shortlisp})
+shortnativelisp_filter = leim/leim-list.el site-load.eln site-init.eln
+shortnativelisp := $(filter-out ${shortnativelisp_filter},${shortnativelisp})
## 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})
+nativelisp = $(addprefix ${lispsource}/,${shortnativelisp})
## Construct full set of libraries to be linked.
LIBES = $(LIBS) $(W32_LIBS) $(LIBS_GNUSTEP) $(LIBX_BASE) $(LIBIMAGE) \
## 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) \
- lisp.mk $(etc)/DOC $(lisp) \
+ lisp.mk native_lisp.mk $(etc)/DOC $(lisp) $(nativelisp) \
$(lispsource)/international/charprop.el ${charsets}
ifeq ($(DUMPING),unexec)
LC_ALL=C $(RUN_TEMACS) -batch $(BUILD_DETAILS) -l loadup --temacs=dump
fi
distclean: bootstrap-clean
- rm -f Makefile lisp.mk
+ rm -f Makefile lisp.mk native_lisp.mk
rm -fr $(DEPDIR)
maintainer-clean: distclean
@$(MAKE) $(AM_V_NO_PD) -C ../lisp EMACS="$(bootstrap_exe)"\
THEFILE=$< $<c
+%.eln: %.el | bootstrap-emacs$(EXEEXT) $(bootstrap_pdmp)
+ @$(MAKE) -i $(AM_V_NO_PD) -C ../lisp EMACS="$(bootstrap_exe)"\
+ THEFILE=$< $<n
+
## VCSWITNESS points to the file that holds info about the current checkout.
## We use it as a heuristic to decide when to rebuild loaddefs.el.
## If empty it is ignored; the parent makefile can set it to some other value.