From f06d88506933ba58966cb8a4fc1086efeebb35ad Mon Sep 17 00:00:00 2001 From: Kyle Meyer Date: Sat, 27 Feb 2016 20:49:55 -0500 Subject: Makefile: Strip down --- Makefile | 41 ++++++++++++++--------------------------- 1 file changed, 14 insertions(+), 27 deletions(-) (limited to 'Makefile') 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 $< -- cgit v1.2.3