diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 35 |
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 $< |