summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorKyle Meyer <kyle@kyleam.com>2015-02-12 20:39:01 -0500
committerKyle Meyer <kyle@kyleam.com>2015-02-12 20:39:01 -0500
commitf29a26c353441b750a7f2c4f14834f68b6f15ecd (patch)
tree17b5389d79e2ecb57acf91abf67a2d43377cf955 /Makefile
downloadorg-link-edit-f29a26c353441b750a7f2c4f14834f68b6f15ecd.tar.gz
Slurp
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..1a2f3f7
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,35 @@
+EMACS = emacs -Q --batch
+name = org-link-edit
+main_el := $(name).el
+main_elc = $(main_el)c
+AUTOLOADS_FILE := $(name)-autoloads.el
+
+all: $(main_elc)
+
+.PHONY: autoloads
+autoloads: $(AUTOLOADS_FILE)
+
+$(AUTOLOADS_FILE): $(main_el)
+ @$(EMACS) --eval \
+ "(update-file-autoloads \"$(CURDIR)/$<\" nil \"$(CURDIR)/$@\")"
+
+.PHONY: clean
+clean:
+ $(RM) $(main_elc) $(AUTOLOADS_FILE)
+
+.PHONY: help
+help:
+ @printf "\nTargets:\n\n"
+ @printf " all Byte compile $(main_el).\n"
+ @printf " autoloads Generate $(AUTOLOADS_FILE).\n"
+ @printf " clean Remove generated files.\n"
+ @printf " help Print this message.\n"
+ @printf " test Run tests.\n"
+
+.PHONY: test
+test:
+ @$(EMACS) -L . -l test-org-link-edit \
+ --eval "(ert-run-tests-batch-and-exit '(not (tag interactive)))"
+
+%.elc: %.el
+ @$(EMACS) -f batch-byte-compile $<