aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEli Zaretskii2021-09-28 15:00:50 +0300
committerEli Zaretskii2021-09-28 15:00:50 +0300
commit90655e4bc01ba8d00be3281d13cc771b53e75b43 (patch)
treed0f734ef8d6a148745faa261feeb519dc65bd1bd /src
parentb02a7ad2631b6ac3a95e53cb26a0aa1b1ab7e98a (diff)
downloademacs-90655e4bc01ba8d00be3281d13cc771b53e75b43.tar.gz
emacs-90655e4bc01ba8d00be3281d13cc771b53e75b43.zip
Make the build of source tarball produce *.eln files
* lisp/emacs-lisp/comp.el (batch-native-compile): Accept an optional argument; if non-nil, place the .eln file as appropriate for building a source tarball. * doc/lispref/compile.texi (Native-Compilation Functions): Document the new optional argument of 'batch-native-compile'. * lisp/Makefile.in (.PHONY, $(THEFILE)n) [HAVE_NATIVE_COMP]: New targets. * src/Makefile.in (%.eln) [HAVE_NATIVE_COMP]: New recipe. (all) [HAVE_NATIVE_COMP]: Add ../native-lisp to prerequisites. (elnlisp) [HAVE_NATIVE_COMP]: New list of *.eln files. (../native-lisp) [HAVE_NATIVE_COMP]: New recipe. * src/verbose.mk.in (AM_V_ELN): New macro.
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.in40
-rw-r--r--src/verbose.mk.in4
2 files changed, 44 insertions, 0 deletions
diff --git a/src/Makefile.in b/src/Makefile.in
index c11d96d2c4e..34335cfa96d 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -448,7 +448,15 @@ FIRSTFILE_OBJ=@FIRSTFILE_OBJ@
448ALLOBJS = $(FIRSTFILE_OBJ) $(VMLIMIT_OBJ) $(obj) $(otherobj) 448ALLOBJS = $(FIRSTFILE_OBJ) $(VMLIMIT_OBJ) $(obj) $(otherobj)
449 449
450# Must be first, before dep inclusion! 450# Must be first, before dep inclusion!
451ifeq ($(HAVE_NATIVE_COMP),yes)
452ifeq ($(NATIVE_DISABLED),)
453all: emacs$(EXEEXT) $(pdmp) $(OTHER_FILES) ../native-lisp
454else
455all: emacs$(EXEEXT) $(pdmp) $(OTHER_FILES)
456endif
457else
451all: emacs$(EXEEXT) $(pdmp) $(OTHER_FILES) 458all: emacs$(EXEEXT) $(pdmp) $(OTHER_FILES)
459endif
452.PHONY: all 460.PHONY: all
453 461
454dmpstruct_headers=$(srcdir)/lisp.h $(srcdir)/buffer.h \ 462dmpstruct_headers=$(srcdir)/lisp.h $(srcdir)/buffer.h \
@@ -775,6 +783,38 @@ tags: TAGS ../lisp/TAGS $(lwlibdir)/TAGS
775 @$(MAKE) $(AM_V_NO_PD) -C ../lisp EMACS="$(bootstrap_exe)"\ 783 @$(MAKE) $(AM_V_NO_PD) -C ../lisp EMACS="$(bootstrap_exe)"\
776 THEFILE=$< $<c 784 THEFILE=$< $<c
777 785
786ifeq ($(HAVE_NATIVE_COMP),yes)
787ifeq ($(NATIVE_DISABLED),)
788## The following rules are used only when building a source tarball
789## for the first time, when the native-lisp/ directory doesn't yet
790## exist and needs to be created and populated with the preloaded
791## *.eln files.
792
793## List of *.eln files we need to produce in addition to the preloaded
794## ones in $(lisp).
795elnlisp := \
796 emacs-lisp/autoload.eln \
797 emacs-lisp/byte-opt.eln \
798 emacs-lisp/bytecomp.eln \
799 emacs-lisp/cconv.eln \
800 international/charscript.eln \
801 emacs-lisp/comp.eln \
802 emacs-lisp/comp-cstr.eln \
803 international/emoji-zwj.eln
804elnlisp := $(addprefix ${lispsource}/,${elnlisp}) $(lisp:.elc=.eln)
805
806%.eln: %.el | emacs$(EXEEXT) $(pdmp)
807 @$(MAKE) $(AM_V_NO_PD) -C ../lisp EMACS="../src/emacs$(EXEEXT)"\
808 THEFILE=$< $<n
809
810../native-lisp: | $(pdmp)
811 mkdir $@ && $(MAKE) $(AM_V_NO_PD) $(elnlisp)
812 LC_ALL=C $(RUN_TEMACS) -batch $(BUILD_DETAILS) -l loadup --temacs=pdump \
813 --bin-dest $(BIN_DESTDIR) --eln-dest $(ELN_DESTDIR)
814 cp -f $@ $(bootstrap_pdmp)
815endif
816endif
817
778## VCSWITNESS points to the file that holds info about the current checkout. 818## VCSWITNESS points to the file that holds info about the current checkout.
779## We use it as a heuristic to decide when to rebuild loaddefs.el. 819## We use it as a heuristic to decide when to rebuild loaddefs.el.
780## If empty it is ignored; the parent makefile can set it to some other value. 820## If empty it is ignored; the parent makefile can set it to some other value.
diff --git a/src/verbose.mk.in b/src/verbose.mk.in
index 50d6ea32000..a5ff931ed09 100644
--- a/src/verbose.mk.in
+++ b/src/verbose.mk.in
@@ -25,6 +25,7 @@ AM_V_at =
25AM_V_CC = 25AM_V_CC =
26AM_V_CCLD = 26AM_V_CCLD =
27AM_V_ELC = 27AM_V_ELC =
28AM_V_ELN =
28AM_V_GEN = 29AM_V_GEN =
29AM_V_GLOBALS = 30AM_V_GLOBALS =
30AM_V_NO_PD = 31AM_V_NO_PD =
@@ -37,11 +38,14 @@ AM_V_CCLD = @echo " CCLD " $@;
37ifeq ($(HAVE_NATIVE_COMP),yes) 38ifeq ($(HAVE_NATIVE_COMP),yes)
38ifeq ($(NATIVE_DISABLED),1) 39ifeq ($(NATIVE_DISABLED),1)
39AM_V_ELC = @echo " ELC " $@; 40AM_V_ELC = @echo " ELC " $@;
41AM_V_ELN =
40else 42else
41AM_V_ELC = @echo " ELC+ELN " $@; 43AM_V_ELC = @echo " ELC+ELN " $@;
44AM_V_ELN = @echo " ELN " $@;
42endif 45endif
43else 46else
44AM_V_ELC = @echo " ELC " $@; 47AM_V_ELC = @echo " ELC " $@;
48AM_V_ELN =
45endif 49endif
46AM_V_GEN = @echo " GEN " $@; 50AM_V_GEN = @echo " GEN " $@;
47AM_V_GLOBALS = @echo " GEN " globals.h; 51AM_V_GLOBALS = @echo " GEN " globals.h;