aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorKyle Meyer <kyle@kyleam.com>2016-04-17 19:49:45 -0400
committerKyle Meyer <kyle@kyleam.com>2016-04-17 20:56:01 -0400
commitb3ca3d3da717fd42b920ddd197897f19855e5444 (patch)
tree7aaea00c6eb18f589a65aede6dc1a86db9e3fa7c /Makefile
parent1dccdd134022e8deaf5e0d5db8ff15a090ae26a8 (diff)
downloadsnakemake-mode-b3ca3d3da717fd42b920ddd197897f19855e5444.tar.gz
Makefile: Download dependencies
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile21
1 files changed, 17 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index c902c6f..a4d882d 100644
--- a/Makefile
+++ b/Makefile
@@ -1,17 +1,21 @@
-LOAD_PATH ?=
+LOAD_PATH = -L .deps -L .
BATCH = emacs -Q --batch $(LOAD_PATH)
+CURL := curl --silent
els := snakemake.el snakemake-mode.el
elcs := $(patsubst %.el, %.elc, $(els))
AUTOLOADS_FILE = snakemake-autoloads.el
+DASH_URL := https://raw.githubusercontent.com/magnars/dash.el/master/dash.el
+POPUP_URL := https://raw.githubusercontent.com/magit/magit/master/lisp/magit-popup.el
+
.PHONY: all
all: $(elcs) $(AUTOLOADS_FILE)
.PHONY: test
-test:
- @$(BATCH) -L . -l snakemake-test \
+test: | .deps
+ @$(BATCH) -l snakemake-test \
--eval "(ert-run-tests-batch-and-exit '(not (tag interactive)))"
$(AUTOLOADS_FILE): $(main_el)
@@ -20,9 +24,18 @@ $(AUTOLOADS_FILE): $(main_el)
(generated-autoload-file \"$(CURDIR)/$@\")) \
(update-directory-autoloads \"$(CURDIR)/\"))"
-%.elc: %.el
+.deps:
+ mkdir -p .deps
+ $(CURL) $(DASH_URL) > .deps/dash.el
+ $(CURL) $(POPUP_URL) > .deps/magit-popup.el
+
+%.elc: %.el | .deps
@$(BATCH) -f batch-byte-compile $<
.PHONY: clean
clean:
$(RM) $(elcs) $(AUTOLOADS_FILE)
+
+.PHONY: clean-all
+clean-all: clean
+ $(RM) -r .deps