summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAchim Gratz <Stromeko@Stromeko.DE>2012-08-04 15:50:39 +0200
committerAchim Gratz <Stromeko@Stromeko.DE>2012-08-04 15:59:08 +0200
commitb9916f2e2bf507c5f0f111e051d16888464e72cd (patch)
treeee4f0cc44375660e6cc8efb58554b45483589d48
parent9d045b21bb9557c150298c023291084a70e9e65f (diff)
downloadorg-mode-b9916f2e2bf507c5f0f111e051d16888464e72cd.tar.gz
Makefile: enable one-process-per-source compilations again
* default.mk: Re-introduce ELC for single file compilation. * targets.mk: New targets compile-single and compile-single-source that get handed off to lisp/Makefile. * lisp/Makefile: Implement pattern rule using $(ELC). Implement target compile-single that uses a separate Emacs process for each target by invoking the pattern rule. Implement target compile-single-source that additionally removes the compiled file directly after it has been produced, so compilation will always use source files only, never byte-compiled files. * Makefile: Document new targets. These new targets are meant to check for problems with interdependencies in Org.
-rw-r--r--Makefile98
-rw-r--r--default.mk4
-rw-r--r--lisp/Makefile8
-rw-r--r--targets.mk4
4 files changed, 63 insertions, 51 deletions
diff --git a/Makefile b/Makefile
index b411d30..2cf3718 100644
--- a/Makefile
+++ b/Makefile
@@ -18,84 +18,86 @@ help helpall::
$(info Getting Help)
$(info ============)
$(info )
- $(info make help - show brief help)
- $(info make targets - ditto)
- $(info make helpall - show extended help)
+ $(info make help - show brief help)
+ $(info make targets - ditto)
+ $(info make helpall - show extended help)
$(info )
$(info Build and Check)
$(info ===============)
- $(info make - build Org ELisp and all documentation)
- $(info make all - ditto)
- $(info make compile - build Org ELisp files)
- $(info make autoloads - create org-install.el to load org in-place)
- $(info make check - build Org ELisp files and run test suite)
+ $(info make - build Org ELisp and all documentation)
+ $(info make all - ditto)
+ $(info make compile - build Org ELisp files)
+ $(info make autoloads - create org-install.el to load org in-place)
+ $(info make check - build Org ELisp files and run test suite)
helpall::
- $(info make test - ditto)
- $(info make compile-dirty - build only stale Org ELisp files)
- $(info make test-dirty - check without building first)
+ $(info make test - ditto)
+ $(info make compile-dirty - build only stale Org ELisp files)
+ $(info make compile-single - build using one Emacs process per file)
+ $(info make compile-source - ditto, but immediately remove byte-compiled file )
+ $(info make test-dirty - check without building first)
$(info )
$(info Compatibility)
$(info =============)
- $(info make oldorg - what the old make did: compile autoloads info)
+ $(info make oldorg - what the old make did: compile autoloads info)
$(info )
$(info Convenience)
$(info ===========)
- $(info make up0 - pull from upstream)
- $(info make up1 - pull from upstream, build and check)
- $(info make up2 - pull from upstream, build, check and install)
- $(info make update - pull from upstream and build)
- $(info make update2 - pull from upstream, build and install)
- $(info make uncompiled - combine cleanlisp and autoloads)
- $(info make local.mk - create new local.mk as template for adaptation)
+ $(info make up0 - pull from upstream)
+ $(info make up1 - pull from upstream, build and check)
+ $(info make up2 - pull from upstream, build, check and install)
+ $(info make update - pull from upstream and build)
+ $(info make update2 - pull from upstream, build and install)
+ $(info make uncompiled - combine cleanlisp and autoloads)
+ $(info make local.mk - create new local.mk as template for adaptation)
$(info )
$(info Cleaning)
$(info ========)
- $(info make clean - remove built Org ELisp files and documentation)
- $(info make cleanall - remove everything that can be built and all remnants)
- $(info make cleandirs - clean in etc/, lisp/ and doc/)
- $(info make cleancontrib - remove remnants in contrib/)
- $(info make cleantesting - remove remnants in testing/)
- $(info make cleanutils - remove remnants in UTILITIES/)
- $(info make cleandoc - remove built documentation)
- $(info make cleandocs - ditto)
- $(info make cleanlisp - remove built Org ELisp files)
- $(info make cleanelc - ditto)
- $(info make cleantest - remove test directory)
- $(info make clean-install - remove previous Org installation)
+ $(info make clean - remove built Org ELisp files and documentation)
+ $(info make cleanall - remove everything that can be built and all remnants)
+ $(info make cleandirs - clean in etc/, lisp/ and doc/)
+ $(info make cleancontrib - remove remnants in contrib/)
+ $(info make cleantesting - remove remnants in testing/)
+ $(info make cleanutils - remove remnants in UTILITIES/)
+ $(info make cleandoc - remove built documentation)
+ $(info make cleandocs - ditto)
+ $(info make cleanlisp - remove built Org ELisp files)
+ $(info make cleanelc - ditto)
+ $(info make cleantest - remove test directory)
+ $(info make clean-install - remove previous Org installation)
$(info )
$(info Configuration Check)
$(info ===================)
help helpall::
- $(info make config - check main configuration)
+ $(info make config - check main configuration)
helpall::
- $(info make config-test - check test configuration)
- $(info make config-exe - check executables configuration)
- $(info make config-cmd - check command configuration)
- $(info make config-all - check all configuration)
- $(info make config-eol - check all configuration, mark end-of-line)
+ $(info make config-test - check test configuration)
+ $(info make config-exe - check executables configuration)
+ $(info make config-cmd - check command configuration)
+ $(info make config-all - check all configuration)
+ $(info make config-eol - check all configuration, mark end-of-line)
$(info )
$(info Documentation)
$(info =============)
help helpall::
- $(info make doc - build all documentation)
+ $(info make doc - build all documentation)
helpall::
- $(info make docs - ditto)
+ $(info make docs - ditto)
help helpall::
- $(info make info - build Info documentation)
+ $(info make info - build Info documentation)
helpall::
- $(info make html - build HTML documentation)
- $(info make pdf - build PDF documentation)
- $(info make card - build reference cards)
- $(info make refcard - ditto)
+ $(info make html - build HTML documentation)
+ $(info make pdf - build PDF documentation)
+ $(info make card - build reference cards)
+ $(info make refcard - ditto)
help helpall::
$(info )
$(info Installation)
$(info ============)
- $(info make install - build and install Org)
+ $(info make install - build and install Org)
helpall::
- $(info make install-etc - build and install files in /etc)
- $(info make install-lisp - build and install Org Elisp files)
- $(info make install-info - build and install Info documentation)
+ $(info make install-etc - build and install files in /etc)
+ $(info make install-lisp - build and install Org Elisp files)
+ $(info make install-info - build and install Info documentation)
help helpall::
@echo ""
diff --git a/default.mk b/default.mk
index c037919..2ac552b 100644
--- a/default.mk
+++ b/default.mk
@@ -90,6 +90,10 @@ MAKE_ORG_VERSION = $(BATCHL) \
ELCDIR = $(BATCHL) \
--eval '(batch-byte-recompile-directory 0)'
+# How to byte-compile a single file
+ELC = $(BATCHL) \
+ --eval '(batch-byte-compile)'
+
# How to make a pdf file from a texinfo file
TEXI2PDF = texi2pdf --batch --clean
diff --git a/lisp/Makefile b/lisp/Makefile
index b4b3e22..ee0caaf 100644
--- a/lisp/Makefile
+++ b/lisp/Makefile
@@ -10,7 +10,7 @@ LISPA = $(LISPV) $(LISPI)
LISPF = $(filter-out $(LISPA),$(wildcard *.el))
LISPC = $(filter-out $(LISPN:%el=%elc),$(LISPF:%el=%elc))
-.PHONY: all compile compile-dirty \
+.PHONY: all compile compile-dirty compile-single \
autoloads \
install clean cleanauto cleanall clean-install
@@ -18,6 +18,12 @@ LISPC = $(filter-out $(LISPN:%el=%elc),$(LISPF:%el=%elc))
all compile:: autoloads
all compile compile-dirty:: $(LISPI) $(LISPV)
$(ELCDIR)
+compile-single: clean autoloads $(LISPC)
+compile-source: clean autoloads
+ @$(foreach elc,$(LISPC),$(MAKE) $(elc) && $(RM) $(elc);)
+
+%.elc: %.el
+ -$(ELC) $(<)
autoloads: cleanauto $(LISPI) $(LISPV)
diff --git a/targets.mk b/targets.mk
index 871c338..5db69f3 100644
--- a/targets.mk
+++ b/targets.mk
@@ -28,7 +28,7 @@ endif
cleancontrib cleantesting cleanutils
cleanrel clean-install cleanelc cleandirs \
cleanlisp cleandoc cleandocs cleantest \
- compile compile-dirty uncompiled \
+ compile compile-single compile-source compile-dirty uncompiled \
config config-test config-exe config-all config-eol
CONF_BASE = EMACS DESTDIR
@@ -75,7 +75,7 @@ local.mk:
all compile::
$(foreach dir, doc lisp, $(MAKE) -C $(dir) clean;)
-compile compile-dirty::
+compile compile-dirty compile-single compile-source::
$(MAKE) -C lisp $@
all clean-install::
$(foreach dir, $(SUBDIRS), $(MAKE) -C $(dir) $@;)