-
Notifications
You must be signed in to change notification settings - Fork 47
/
Makefile
58 lines (43 loc) · 1.26 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
46
47
48
49
50
51
52
53
54
55
56
57
58
.PHONY : all test unit-test ecukes
EMACS ?= emacs
SRC = $(filter-out %-pkg.el, $(wildcard *.el reporters/*.el))
ELC = $(SRC:.el=.elc)
AUTOLOADS = google-translate-autoloads.el
CASK ?= cask
PKG_DIR := $(shell $(CASK) package-directory)
FEATURES = $(wildcard features/*.feature)
VERSION = 0.12.0
%.elc: %.el autoloads
$(EMACS) -Q -batch -L . --eval \
"(let ((default-directory (expand-file-name \".cask\" default-directory))) \
(require 'package) \
(normal-top-level-add-subdirs-to-load-path))" \
-f package-initialize -f batch-byte-compile $<
all: cask $(ELCS) autoloads
autoloads: $(AUTOLOADS)
$(AUTOLOADS): $(ELCS)
$(EMACS) -Q -batch -L . --eval \
"(progn \
(require 'package) \
(normal-top-level-add-subdirs-to-load-path) \
(package-generate-autoloads \"phpactor\" default-directory))"
cask: .cask/installed
.cask/installed: Cask
$(CASK) install
@touch .cask/installed
test:
$(MAKE) unit-test
$(MAKE) ecukes
unit-test: .cask $(ELCS)
$(CASK) exec ert-runner
$(PKG_DIR):
touch $@
ecukes:
$(CASK) exec ecukes --reporter magnars --script $(FEATURES) --no-win
version:
@echo $(VERSION)
tag:
git tag v$(VERSION) && git push origin --tags
clean:
rm -f $(ELC) $(AUTOLOADS)
.PHONY: all autoloads cask clean elc ecukes tag test unit-test version