aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorKyle Meyer <kyle@kyleam.com>2015-03-05 00:54:44 -0500
committerKyle Meyer <kyle@kyleam.com>2015-03-05 00:54:44 -0500
commit80712fc3b4b6a307eaf91058d7b124b4020359a3 (patch)
tree2af639cb2394f8b1137f59ea95d87525bd807fb6 /Makefile
parent27f7a0b0a2e5202360a0ff3607e251dc52dbe7a8 (diff)
downloadsnakemake-mode-80712fc3b4b6a307eaf91058d7b124b4020359a3.tar.gz
Add Makefile
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile35
1 files changed, 35 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..4307101
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,35 @@
+EMACS = emacs -Q --batch
+name = snakemake-mode
+main_el := $(name).el
+main_elc = $(main_el)c
+AUTOLOADS_FILE := $(name)-autoloads.el
+
+all: elc autoloads
+
+.PHONY: autoloads
+autoloads: $(AUTOLOADS_FILE)
+
+$(AUTOLOADS_FILE): $(main_el)
+ @$(EMACS) --eval \
+ "(let (make-backup-files) \
+ (update-file-autoloads \"$(CURDIR)/$<\" t \"$(CURDIR)/$@\"))"
+
+.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"
+
+%.elc: %.el
+ @$(EMACS) -f batch-byte-compile $<