-
Notifications
You must be signed in to change notification settings - Fork 279
/
Makefile
80 lines (62 loc) · 1.91 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
EMACS ?= emacs
SED ?= sed
FILES = $(filter-out evil-test-helpers.el evil-tests.el evil-pkg.el,$(wildcard evil*.el))
VERSION := $(shell $(SED) -n '/^;\+ \+Version: *\(.*\)/{s//\1/p;q}' evil.el)
PROFILER =
TAG =
EASK ?= eask
ELCFILES = $(FILES:.el=.elc)
.PHONY: all compile docstrings doc clean tests test emacs term terminal profiler indent elpa version
# Byte-compile Evil.
all: compile
compile:
$(EASK) compile
# Documentation.
docstrings:
@$(EMACS) --script scripts/evil-extract-docstrings
doc: docstrings
@$(MAKE) -C doc texinfo
info: doc
@$(MAKE) -C doc info
# Delete byte-compiled files etc.
clean:
$(EASK) clean all
# Run tests.
# The TAG variable may specify a test tag or a test name:
# make test TAG=repeat
# This will only run tests pertaining to the repeat system.
test:
$(EASK) run command test
# Byte-compile Evil and run all tests.
tests: compile
$(EASK) run command test
$(EASK) clean elc
rm -f .depend
# Load Evil in a fresh instance of Emacs and run all tests.
emacs:
$(EMACS) -Q -L . -l evil-tests.el \
--eval "(evil-mode 1)" \
--eval "(evil-tests-initialize '(${TAG}) '(${PROFILER}) t)"
# Load Evil in a terminal Emacs and run all tests.
term terminal:
$(EASK) run command terminal
# Run all tests with profiler.
profiler:
$(EASK) run command profiler
# Re-indent all Evil code.
# Loads Evil into memory in order to indent macros properly.
# Also removes trailing whitespace, tabs and extraneous blank lines.
indent: clean
$(EASK) run command indent
evil-pkg.el: evil.el
$(EMACS) --batch -l package $^ \
--eval "(package-generate-description-file (package-buffer-info) \"$@\")"
# Create an ELPA package.
elpa: evil-pkg.el
$(EASK) package
# Change the version using make VERSION=x.y.z
version:
@$(EMACS) --script scripts/evilupdate "${VERSION}"
# Change the version using make VERSION=x.y.z, but do not post to the newsgroup
nversion:
@$(EMACS) --script scripts/evilupdate nonews "${VERSION}"