aboutsummaryrefslogtreecommitdiff
path: root/Makefile
blob: c5621ac89beb569fcf82d0a9b32e280f8234be1f (plain)
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
SHELL = /bin/sh
EMACS ?= emacs
SED ?= sed
FILES = $(filter-out evil-test-helpers.el evil-tests.el evil-pkg.el,$(wildcard evil*.el))
VERSION := $(shell $(SED) -ne '/define-package/,$$p' evil-pkg.el | $(SED) -ne '/^\s*"[[:digit:]]\+\(\.[[:digit:]]\+\)*"\s*$$/ s/^.*"\(.*\)".*$$/\1/p')
PROFILER =
DOC = doc
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
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

# Create an ELPA package.
elpa:
	$(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}"