-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathMakefile
45 lines (36 loc) · 1.18 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
EMACS ?= emacs
CASK ?= cask
LOADPATH = -L .
TESTPATH = -L ./test
ELPA_DIR = \
.cask/$(shell $(EMACS) -Q --batch --eval '(princ emacs-version)')/elpa
compile:
$(CASK) exec $(EMACS) -Q -batch \
-L . \
-f batch-byte-compile *.el
lint:
$(CASK) exec $(EMACS) -Q -batch \
--eval "(require 'package)" \
--eval "(push '(\"melpa\" . \"http://melpa.org/packages/\") package-archives)" \
--eval "(package-initialize)" \
--eval "(package-refresh-contents)" \
-l package-lint.el \
-f package-lint-batch-and-exit evil-textobj-tree-sitter.el
checkdoc:
$(CASK) exec $(EMACS) -Q -batch \
--eval '(find-file "evil-textobj-tree-sitter.el")' \
--eval '(setq checkdoc-create-error-function (lambda (text &rest _) (message "%s" text) (kill-emacs 1)))' \
-l checkdoc.el \
-f checkdoc
test: elpa
$(CASK) exec $(EMACS) -Q -batch $(LOADPATH) $(TESTPATH) \
-l evil-textobj-tree-sitter-test.el -f ert-run-tests-batch-and-exit
test-queries: elpa
$(CASK) exec $(EMACS) -Q -batch $(LOADPATH) $(TESTPATH) \
-l evil-textobj-tree-sitter-query-test.el -f ert-run-tests-batch-and-exit
elpa: $(ELPA_DIR)
$(ELPA_DIR): Cask
$(CASK) install
mkdir -p $(ELPA_DIR)
touch $@
.PHONY: compile lint checkdoc test elpa