aboutsummaryrefslogtreecommitdiff
path: root/Makefile
blob: 15ca4139feea8f60a803b6d099335a74eee0fe68 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29

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

.PHONY: all
all: $(main_elc) $(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)
	@$(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)