emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/buttercup ca09040 130/340: Improve the Makefile


From: ELPA Syncer
Subject: [nongnu] elpa/buttercup ca09040 130/340: Improve the Makefile
Date: Thu, 16 Dec 2021 14:59:19 -0500 (EST)

branch: elpa/buttercup
commit ca090405d92d28bc9552ef4d5eab00e3d18a7d3c
Author: Ryan C. Thompson <rct@thompsonclan.org>
Commit: Jorgen Schäfer <Jorgen.Schaefer@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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]