summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorKyle Meyer <kyle@kyleam.com>2015-12-13 22:51:03 -0500
committerKyle Meyer <kyle@kyleam.com>2015-12-13 22:51:03 -0500
commit05ec15724cda65ae76111c895a1cc59b54615ace (patch)
treef0caa395556165c4c02778fd5b9e986525843c3f /Makefile
parentea55493083ba08ac96e6cf130f24ac38c94abb45 (diff)
downloadbog-05ec15724cda65ae76111c895a1cc59b54615ace.tar.gz
Makefile: Simplify
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile45
1 files changed, 12 insertions, 33 deletions
diff --git a/Makefile b/Makefile
index 5704e62..e3d5987 100644
--- a/Makefile
+++ b/Makefile
@@ -1,43 +1,22 @@
-EMACS = emacs
-BATCH := $(EMACS) -Q --batch
-name = bog
-main_el := $(name).el
-main_elc = $(main_el)c
-AUTOLOADS_FILE := $(name)-autoloads.el
-all: elc autoloads
+LOAD_PATH ?=
+BATCH = emacs -Q --batch $(LOAD_PATH)
-.PHONY: autoloads
-autoloads: $(AUTOLOADS_FILE)
+all: bog.elc bog-autoloads.el
-$(AUTOLOADS_FILE): $(main_el)
- @$(BATCH) -L . --eval \
- "(let (make-backup-files) \
- (update-file-autoloads \"$(CURDIR)/$<\" t \"$(CURDIR)/$@\"))"
+.PHONY: test
+test: bog.elc
+ @$(BATCH) -L . -l bog-tests.el \
+ --eval "(ert-run-tests-batch-and-exit '(not (tag interactive)))"
.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)
- @$(BATCH) -L . -l bog-tests \
- --eval "(ert-run-tests-batch-and-exit '(not (tag interactive)))"
+ $(RM) bog.elc bog-autoloads.el
%.elc: %.el
@$(BATCH) -L . -f batch-byte-compile $<
+bog-autoloads.el: bog.el
+ @$(BATCH) -L . --eval \
+ "(let (make-backup-files) \
+ (update-file-autoloads \"$(CURDIR)/$<\" t \"$(CURDIR)/$@\"))"