forked from mirrors/org-mode
Add new make target for native compilation
* lisp/Makefile (LISPN): New variable listing all the valid .eln targets. (_ORGCM_): (compile-native): (native): New compile target. (%.eln): Rule how to compile .eln files from .el files. * mk/default.mk (ELN): Command to perform native compilation of a single .eln file. * mk/targets.mk (.PHONY): (CONF_CALL): List the new targets and variables. (native): Add target.
This commit is contained in:
parent
bfc0cb3723
commit
ee395b9b8e
|
@ -10,7 +10,8 @@ LISPA := $(LISPV) $(LISPI)
|
||||||
LISPB := $(LISPA:%el=%elc) org-install.elc
|
LISPB := $(LISPA:%el=%elc) org-install.elc
|
||||||
LISPF := $(filter-out $(LISPA),$(sort $(wildcard *.el)))
|
LISPF := $(filter-out $(LISPA),$(sort $(wildcard *.el)))
|
||||||
LISPC := $(filter-out $(LISPB) $(LISPN:%el=%elc),$(LISPF:%el=%elc))
|
LISPC := $(filter-out $(LISPB) $(LISPN:%el=%elc),$(LISPF:%el=%elc))
|
||||||
_ORGCM_ := dirall single source slint1 slint2
|
LISPN := $(filter-out $(LISPB) $(LISPN:%el=%eln),$(LISPF:%el=%eln))
|
||||||
|
_ORGCM_ := dirall single native source slint1 slint2
|
||||||
-include local.mk
|
-include local.mk
|
||||||
|
|
||||||
.PHONY: all compile compile-dirty \
|
.PHONY: all compile compile-dirty \
|
||||||
|
@ -28,6 +29,7 @@ endif
|
||||||
|
|
||||||
compile-dirall: dirall
|
compile-dirall: dirall
|
||||||
compile-single: single $(LISPC)
|
compile-single: single $(LISPC)
|
||||||
|
compile-native: native $(LISPN)
|
||||||
compile-source: source dirall
|
compile-source: source dirall
|
||||||
compile-slint1: dirall slint1
|
compile-slint1: dirall slint1
|
||||||
compile-slint2: source dirall slint1
|
compile-slint2: source dirall slint1
|
||||||
|
@ -38,6 +40,8 @@ dirall:
|
||||||
@$(ELCDIR)
|
@$(ELCDIR)
|
||||||
single:
|
single:
|
||||||
@$(info ==================== $@ ====================)
|
@$(info ==================== $@ ====================)
|
||||||
|
native:
|
||||||
|
@$(info ==================== $@ ====================)
|
||||||
source: cleanelc
|
source: cleanelc
|
||||||
@$(info ==================== $@ ====================)
|
@$(info ==================== $@ ====================)
|
||||||
@$(foreach elc,$(LISPC),$(MAKE) $(elc) && $(RM) $(elc);)
|
@$(foreach elc,$(LISPC),$(MAKE) $(elc) && $(RM) $(elc);)
|
||||||
|
@ -49,6 +53,10 @@ slint1:
|
||||||
@$(info Compiling single $(abspath $<)...)
|
@$(info Compiling single $(abspath $<)...)
|
||||||
-@$(ELC) $<
|
-@$(ELC) $<
|
||||||
|
|
||||||
|
%.eln: %.el
|
||||||
|
@$(info Native compiling single $(abspath $<)...)
|
||||||
|
-@$(ELN) $<
|
||||||
|
|
||||||
autoloads: cleanauto $(LISPI) $(LISPV)
|
autoloads: cleanauto $(LISPI) $(LISPV)
|
||||||
|
|
||||||
$(LISPV): $(LISPF)
|
$(LISPV): $(LISPF)
|
||||||
|
|
|
@ -156,6 +156,10 @@ ELCDIR = $(BATCHL) \
|
||||||
ELC = $(BATCHL) \
|
ELC = $(BATCHL) \
|
||||||
--eval '(batch-byte-compile)'
|
--eval '(batch-byte-compile)'
|
||||||
|
|
||||||
|
# How to native-compile a single file
|
||||||
|
ELN = $(BATCHL) \
|
||||||
|
--eval '(batch-native-compile)'
|
||||||
|
|
||||||
# How to make a pdf file from a texinfo file
|
# How to make a pdf file from a texinfo file
|
||||||
TEXI2PDF = texi2pdf --batch --clean --expand
|
TEXI2PDF = texi2pdf --batch --clean --expand
|
||||||
|
|
||||||
|
@ -202,6 +206,7 @@ INSTALL_INFO = install-info
|
||||||
ORGCM = dirall
|
ORGCM = dirall
|
||||||
# ORGCM = dirall # 1x slowdown compared to default compilation method
|
# ORGCM = dirall # 1x slowdown compared to default compilation method
|
||||||
# ORGCM = single # 4x one Emacs process per compilation
|
# ORGCM = single # 4x one Emacs process per compilation
|
||||||
|
# ORGCM = native # 4x one Emacs process per native compilation
|
||||||
# ORGCM = source # 5x ditto, but remove compiled file immediately
|
# ORGCM = source # 5x ditto, but remove compiled file immediately
|
||||||
# ORGCM = slint1 # 3x possibly elicit more warnings
|
# ORGCM = slint1 # 3x possibly elicit more warnings
|
||||||
# ORGCM = slint2 # 7x possibly elicit even more warnings
|
# ORGCM = slint2 # 7x possibly elicit even more warnings
|
||||||
|
|
|
@ -27,7 +27,7 @@ ifneq ($(GITSTATUS),)
|
||||||
GITVERSION := $(GITVERSION:.dirty=).dirty
|
GITVERSION := $(GITVERSION:.dirty=).dirty
|
||||||
endif
|
endif
|
||||||
|
|
||||||
.PHONY: all oldorg update update2 up0 up1 up2 single $(SUBDIRS) \
|
.PHONY: all oldorg update update2 up0 up1 up2 single native $(SUBDIRS) \
|
||||||
check test install $(INSTSUB) \
|
check test install $(INSTSUB) \
|
||||||
info html pdf card refcard doc docs \
|
info html pdf card refcard doc docs \
|
||||||
autoloads cleanall clean $(CLEANDIRS:%=clean%) \
|
autoloads cleanall clean $(CLEANDIRS:%=clean%) \
|
||||||
|
@ -41,7 +41,7 @@ CONF_BASE = EMACS DESTDIR ORGCM ORG_MAKE_DOC
|
||||||
CONF_DEST = lispdir infodir datadir testdir
|
CONF_DEST = lispdir infodir datadir testdir
|
||||||
CONF_TEST = BTEST_PRE BTEST_POST BTEST_OB_LANGUAGES BTEST_EXTRA BTEST_RE
|
CONF_TEST = BTEST_PRE BTEST_POST BTEST_OB_LANGUAGES BTEST_EXTRA BTEST_RE
|
||||||
CONF_EXEC = CP MKDIR RM RMR FIND CHMOD SUDO PDFTEX TEXI2PDF TEXI2HTML MAKEINFO INSTALL_INFO
|
CONF_EXEC = CP MKDIR RM RMR FIND CHMOD SUDO PDFTEX TEXI2PDF TEXI2HTML MAKEINFO INSTALL_INFO
|
||||||
CONF_CALL = BATCH BATCHL ELC ELCDIR NOBATCH BTEST MAKE_LOCAL_MK MAKE_ORG_INSTALL MAKE_ORG_VERSION
|
CONF_CALL = BATCH BATCHL ELC ELN ELCDIR NOBATCH BTEST MAKE_LOCAL_MK MAKE_ORG_INSTALL MAKE_ORG_VERSION
|
||||||
config-eol:: EOL = \#
|
config-eol:: EOL = \#
|
||||||
config-eol:: config-all
|
config-eol:: config-all
|
||||||
config config-all::
|
config config-all::
|
||||||
|
@ -74,6 +74,9 @@ update update2:: up0 all
|
||||||
single: ORGCM=single
|
single: ORGCM=single
|
||||||
single: compile
|
single: compile
|
||||||
|
|
||||||
|
native: ORGCM=native
|
||||||
|
native: compile
|
||||||
|
|
||||||
.PRECIOUS: local.mk
|
.PRECIOUS: local.mk
|
||||||
local.mk:
|
local.mk:
|
||||||
$(info ======================================================)
|
$(info ======================================================)
|
||||||
|
|
Loading…
Reference in New Issue