branch: elpa/buttercup commit ca090405d92d28bc9552ef4d5eab00e3d18a7d3c Author: Ryan C. Thompson <r...@thompsonclan.org> Commit: Jorgen Schäfer <jorgen.schae...@gmail.com>
Improve the Makefile * Make compile a prerequisite of test * Compile elisp files in parallel (with make -j) * Use wildcards to avoid enumerating all elisp files --- Makefile | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index b7fd593..1802b07 100644 --- a/Makefile +++ b/Makefile @@ -1,18 +1,20 @@ EMACS := emacs -VERSION = $(shell sed -ne 's/^;; Version: \(.*\)/\1/p' buttercup.el) -DISTFILES = buttercup.el buttercup-compat.el buttercup-pkg.el README.md +VERSION := $(shell sed -ne 's/^;; Version: \(.*\)/\1/p' buttercup.el) +ELISP_FILES := $(shell ls *.el | grep -v -- '-pkg\.el$$') +DISTFILES := $(ELISP_FILES) buttercup-pkg.el README.md - -.PHONY: test +.PHONY: test compile clean all: test -test: +test: compile $(EMACS) -batch -L . -l buttercup.el -f buttercup-run-markdown docs/writing-tests.md ./bin/buttercup -L . -compile: - $(EMACS) -batch -L . -f batch-byte-compile *.el +compile: $(patsubst %.el,%.elc,$(ELISP_FILES)) + +%.elc: %.el + $(EMACS) -batch -L . -f batch-byte-compile $< release: clean test mkdir -p dist