forked from emacs-berlin/syntactic-close
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
47 lines (35 loc) · 858 Bytes
/
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
46
47
CASK = cask
EMACS = emacs
EMACSOPTS =
ERTSELECTOR = t
EMACSBATCH = $(EMACS) -Q --batch $(EMACSOPTS)
HAVE_CASK := $(shell sh -c "command -v $(CASK)")
ifndef HAVE_CASK
$(warning "$(CASK) is not available. See \
http://cask.readthedocs.io/en/latest/guide/installation.html \
for installation instructions.")
endif
PKGDIR := $(shell EMACS=$(EMACS) $(CASK) package-directory)
CASK_EMACS = $(EMACS)
export EMACS
export CASK_EMACS
SRCS = syntactic-close.el
OBJS = $(SRCS:.el=.elc)
.PHONY: compile
compile: $(OBJS)
.PHONY: clean
clean:
rm -rf $(OBJS)
.PHONY: clean-deps
clean-deps:
rm -rf .cask/
.PHONY: test
test: compile
$(EMACSBATCH) --script test/syntactic-close-run.el '$(ERTSELECTOR)'
.PHONY: deps
deps: $(PKGDIR)
$(PKGDIR): Cask
$(CASK) install
touch $(PKGDIR)
%.elc: %.el $(PKGDIR)
$(CASK) exec $(EMACSBATCH) -L . -f batch-byte-compile $<