diff options
author | Achim Gratz <Stromeko@Stromeko.DE> | 2012-08-19 12:21:33 +0200 |
---|---|---|
committer | Achim Gratz <Stromeko@Stromeko.DE> | 2012-08-21 21:24:23 +0200 |
commit | 226b15baa0ad9808d59fe1f5069284bb44afaabd (patch) | |
tree | e00fe655188c6581d49d622e55832b2b9bb56739 | |
parent | 3c1c04d8bc8f5c1ef06607a68b632fd071f13485 (diff) | |
download | org-mode-226b15baa0ad9808d59fe1f5069284bb44afaabd.tar.gz |
Makefile: implement different compilation methods, rename _COMPILE_ to ORGCM
* default.mk, targets.mk, lisp/Makefile: Rename _COMPILE_ to ORGCM.
* default.mk: Define ORGCM=dirall, show other possible values as
comments
* targets.mk: Implement target `single´, temporarily set
ORGCM (overriding configuration). Show newly introduced
configuration variables with `check-*´.
* lisp/Makefile: Implement dispatch for compile based on ORGCM.
Output header that contains the target for easier debugging.
* Makefile: Document target `single´.
-rw-r--r-- | Makefile | 1 | ||||
-rw-r--r-- | default.mk | 13 | ||||
-rw-r--r-- | lisp/Makefile | 27 | ||||
-rw-r--r-- | targets.mk | 12 |
4 files changed, 35 insertions, 18 deletions
@@ -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:: @@ -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 c547810..cd2ec1e 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 $<)...) @@ -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 ======================================================) |