summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile41
1 files changed, 14 insertions, 27 deletions
diff --git a/Makefile b/Makefile
index 8b3e837..15ca413 100644
--- a/Makefile
+++ b/Makefile
@@ -1,42 +1,29 @@
-EMACS = emacs -Q --batch
+
+LOAD_PATH ?=
+BATCH = emacs -Q --batch $(LOAD_PATH)
+
name = snakemake-mode
main_el := $(name).el
main_elc = $(main_el)c
AUTOLOADS_FILE := $(name)-autoloads.el
-all: elc autoloads
+.PHONY: all
+all: $(main_elc) $(AUTOLOADS_FILE)
-.PHONY: autoloads
-autoloads: $(AUTOLOADS_FILE)
+.PHONY: test
+test: $(main_elc)
+ @$(BATCH) -L . -l test-snakemake-mode \
+ --eval "(ert-run-tests-batch-and-exit '(not (tag interactive)))"
$(AUTOLOADS_FILE): $(main_el)
- @$(EMACS) --eval \
+ @$(BATCH) --eval \
"(let ((make-backup-files nil) \
(generated-autoload-file \"$(CURDIR)/$@\")) \
(update-file-autoloads \"$(CURDIR)/$<\" t))"
+%.elc: %.el
+ @$(BATCH) -f batch-byte-compile $<
+
.PHONY: clean
clean:
$(RM) $(main_elc) $(AUTOLOADS_FILE)
-
-.PHONY: elc
-elc: $(main_elc)
-
-.PHONY: help
-help:
- @printf "\nMain targets:\n\n"
- @printf " all Byte compile and generate autoloads.\n"
- @printf " autoloads Generate $(AUTOLOADS_FILE).\n"
- @printf " elc Byte compile $(main_el).\n"
- @printf "\nOther:\n\n"
- @printf " clean Remove generated files.\n"
- @printf " help Print this message.\n"
- @printf " test Run tests.\n"
-
-.PHONY: test
-test: $(main_elc)
- @$(EMACS) -L . -l test-snakemake-mode \
- --eval "(ert-run-tests-batch-and-exit '(not (tag interactive)))"
-
-%.elc: %.el
- @$(EMACS) -f batch-byte-compile $<