branch: elpa/macrostep
commit a8e730e9b9ccd631432ed835d77067bdbd81ea55
Author: joddie <[email protected]>
Commit: joddie <[email protected]>
Improve Makefile
---
Makefile | 19 ++++++++++++++++---
1 file changed, 16 insertions(+), 3 deletions(-)
diff --git a/Makefile b/Makefile
index 0540b44..1af7050 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,17 @@
-test:
- emacs --batch --load macrostep-test.el
+EMACS ?= emacs
-.PHONY: test
+all: macrostep.elc
+
+clean:
+ rm -f macrostep.elc macrostep-test.elc
+
+test: macrostep.elc
+ $(EMACS) --batch -L . --load macrostep-test.el
+
+sandbox: macrostep.elc
+ $(EMACS) -Q -L . --load macrostep.elc
+
+%.elc: %.el
+ $(EMACS) --batch --funcall batch-byte-compile "$<"
+
+.PHONY: test all clean