diff --git a/Makefile b/Makefile index eafc363c1..65f9b2c0b 100644 --- a/Makefile +++ b/Makefile @@ -27,6 +27,7 @@ help helpall:: $(info make - build Org ELisp and all documentation) $(info make all - ditto) $(info make compile - build Org ELisp files) + $(info make single - build Org ELisp files, single Emacs per source) $(info make autoloads - create org-install.el to load Org in-place) $(info make test - build Org ELisp files and run test suite) helpall:: diff --git a/default.mk b/default.mk index 8476caec1..27d487936 100644 --- a/default.mk +++ b/default.mk @@ -132,9 +132,10 @@ SUDO = sudo # INSTALL_INFO = ginstall-info # Debian: avoid harmless warning message INSTALL_INFO = install-info -# target variant for 'compile' -# _COMPILE_ = single # one Emacs process per compilation -# _COMPILE_ = source # ditto, but remove compiled file immediately -# _COMPILE_ = slint1 # possibly elicit more warnings -# _COMPILE_ = slint2 # possibly elicit even more warnings -_COMPILE_ = dirall +# target method for 'compile' +ORGCM = dirall +# ORGCM = dirall # 1x slowdown compared to default compilation method +# ORGCM = single # 4x one Emacs process per compilation +# ORGCM = source # 5x ditto, but remove compiled file immediately +# ORGCM = slint1 # 3x possibly elicit more warnings +# ORGCM = slint2 # 7x possibly elicit even more warnings diff --git a/lisp/Makefile b/lisp/Makefile index c547810c7..cd2ec1ed4 100644 --- a/lisp/Makefile +++ b/lisp/Makefile @@ -3,6 +3,7 @@ ifeq ($(MAKELEVEL), 0) $(error This make needs to be started as a sub-make from the toplevel directory.) endif +-include local.mk LISPV = org-version.el LISPI = org-install.el @@ -10,24 +11,34 @@ LISPA = $(LISPV) $(LISPI) LISPF = $(filter-out $(LISPA),$(sort $(wildcard *.el))) LISPC = $(filter-out $(LISPN:%el=%elc),$(LISPF:%el=%elc)) +_ORGCM_ = dirall single source slint1 .PHONY: all compile compile-dirty \ - compile-single compile-source compile-slint1 compile-slint2 \ + $(_ORGCM_) $(_ORGCM_:%=compile-%) compile-slint2 \ autoloads \ install clean cleanauto cleanall cleanelc clean-install # do not clean here, done in toplevel make all compile compile-dirty:: autoloads - $(MAKE) compile-$(_COMPILE_) + $(MAKE) compile-$(ORGCM) -compile-dirall: +compile-dirall: dirall +compile-single: single $(LISPC) +compile-source: source dirall +compile-slint1: dirall slint1 +compile-slint2: source dirall slint1 + +# internal +dirall: + @$(info ==================== $@ ====================) @$(ELCDIR) -compile-single: $(LISPC) -compile-source: cleanelc +single: + @$(info ==================== $@ ====================) +source: cleanelc + @$(info ==================== $@ ====================) @$(foreach elc,$(LISPC),$(MAKE) $(elc) && $(RM) $(elc);) -compile-slint1: compile-dirall +slint1: + @$(info ==================== $@ ====================) @$(foreach elc,$(LISPC),$(RM) $(elc); $(MAKE) $(elc);) -compile-slint2: - $(MAKE) compile-source compile-slint1 %.elc: %.el @$(info Compiling single $(abspath $<)...) diff --git a/targets.mk b/targets.mk index a0e47eac6..ccb29d546 100644 --- a/targets.mk +++ b/targets.mk @@ -22,8 +22,9 @@ ifneq ($(GITSTATUS),) GITVERSION := $(GITVERSION:.dirty=).dirty endif -.PHONY: all oldorg update update2 up0 up1 up2 compile $(SUBDIRS) \ - check test install info html pdf card doc docs $(INSTSUB) \ +.PHONY: all oldorg update update2 up0 up1 up2 single $(SUBDIRS) \ + check test install $(INSTSUB) \ + info html pdf card refcard doc docs \ autoloads cleanall clean \ cleancontrib cleantesting cleanutils cleanrel clean-install cleanelc cleandirs \ @@ -31,11 +32,11 @@ endif compile compile-dirty uncompiled \ config config-test config-exe config-all config-eol -CONF_BASE = EMACS DESTDIR +CONF_BASE = EMACS DESTDIR ORGCM CONF_DEST = lispdir infodir datadir testdir CONF_TEST = BTEST_PRE BTEST_POST BTEST_OB_LANGUAGES BTEST_EXTRA CONF_EXEC = CP MKDIR RM RMR FIND SUDO PDFTEX TEXI2PDF TEXI2HTML MAKEINFO INSTALL_INFO -CONF_CALL = BATCH BATCHL ELCDIR BTEST MAKE_LOCAL_MK MAKE_ORG_INSTALL MAKE_ORG_VERSION +CONF_CALL = BATCH BATCHL ELC ELCDIR BTEST MAKE_LOCAL_MK MAKE_ORG_INSTALL MAKE_ORG_VERSION config-eol:: EOL = \# config-eol:: config-all config config-all:: @@ -63,6 +64,9 @@ uncompiled: cleanlisp autoloads # for developing refcard: card update update2:: up0 all +single: ORGCM=single +single: compile + .PRECIOUS: local.mk local.mk: $(info ======================================================)