diff options
| author | Eli Zaretskii | 2021-09-28 15:00:50 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2021-09-28 15:00:50 +0300 |
| commit | 90655e4bc01ba8d00be3281d13cc771b53e75b43 (patch) | |
| tree | d0f734ef8d6a148745faa261feeb519dc65bd1bd /src | |
| parent | b02a7ad2631b6ac3a95e53cb26a0aa1b1ab7e98a (diff) | |
| download | emacs-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.in | 40 | ||||
| -rw-r--r-- | src/verbose.mk.in | 4 |
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@ | |||
| 448 | ALLOBJS = $(FIRSTFILE_OBJ) $(VMLIMIT_OBJ) $(obj) $(otherobj) | 448 | ALLOBJS = $(FIRSTFILE_OBJ) $(VMLIMIT_OBJ) $(obj) $(otherobj) |
| 449 | 449 | ||
| 450 | # Must be first, before dep inclusion! | 450 | # Must be first, before dep inclusion! |
| 451 | ifeq ($(HAVE_NATIVE_COMP),yes) | ||
| 452 | ifeq ($(NATIVE_DISABLED),) | ||
| 453 | all: emacs$(EXEEXT) $(pdmp) $(OTHER_FILES) ../native-lisp | ||
| 454 | else | ||
| 455 | all: emacs$(EXEEXT) $(pdmp) $(OTHER_FILES) | ||
| 456 | endif | ||
| 457 | else | ||
| 451 | all: emacs$(EXEEXT) $(pdmp) $(OTHER_FILES) | 458 | all: emacs$(EXEEXT) $(pdmp) $(OTHER_FILES) |
| 459 | endif | ||
| 452 | .PHONY: all | 460 | .PHONY: all |
| 453 | 461 | ||
| 454 | dmpstruct_headers=$(srcdir)/lisp.h $(srcdir)/buffer.h \ | 462 | dmpstruct_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 | ||
| 786 | ifeq ($(HAVE_NATIVE_COMP),yes) | ||
| 787 | ifeq ($(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). | ||
| 795 | elnlisp := \ | ||
| 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 | ||
| 804 | elnlisp := $(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) | ||
| 815 | endif | ||
| 816 | endif | ||
| 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 = | |||
| 25 | AM_V_CC = | 25 | AM_V_CC = |
| 26 | AM_V_CCLD = | 26 | AM_V_CCLD = |
| 27 | AM_V_ELC = | 27 | AM_V_ELC = |
| 28 | AM_V_ELN = | ||
| 28 | AM_V_GEN = | 29 | AM_V_GEN = |
| 29 | AM_V_GLOBALS = | 30 | AM_V_GLOBALS = |
| 30 | AM_V_NO_PD = | 31 | AM_V_NO_PD = |
| @@ -37,11 +38,14 @@ AM_V_CCLD = @echo " CCLD " $@; | |||
| 37 | ifeq ($(HAVE_NATIVE_COMP),yes) | 38 | ifeq ($(HAVE_NATIVE_COMP),yes) |
| 38 | ifeq ($(NATIVE_DISABLED),1) | 39 | ifeq ($(NATIVE_DISABLED),1) |
| 39 | AM_V_ELC = @echo " ELC " $@; | 40 | AM_V_ELC = @echo " ELC " $@; |
| 41 | AM_V_ELN = | ||
| 40 | else | 42 | else |
| 41 | AM_V_ELC = @echo " ELC+ELN " $@; | 43 | AM_V_ELC = @echo " ELC+ELN " $@; |
| 44 | AM_V_ELN = @echo " ELN " $@; | ||
| 42 | endif | 45 | endif |
| 43 | else | 46 | else |
| 44 | AM_V_ELC = @echo " ELC " $@; | 47 | AM_V_ELC = @echo " ELC " $@; |
| 48 | AM_V_ELN = | ||
| 45 | endif | 49 | endif |
| 46 | AM_V_GEN = @echo " GEN " $@; | 50 | AM_V_GEN = @echo " GEN " $@; |
| 47 | AM_V_GLOBALS = @echo " GEN " globals.h; | 51 | AM_V_GLOBALS = @echo " GEN " globals.h; |