-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
82 lines (69 loc) · 2.47 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
81
82
# Makefile
EMACS ?= emacs
EASK ?= eask
.PHONY: help all clean package install compile test test-local docker-test lint emacs
help:
$(info )
$(info - make # Show this help)
$(info - make all # Run clean, package, install, compile, lint and test)
$(info - make clean # Clean everything)
$(info - make package # Build package artifact)
$(info - make install # Install the package)
$(info - make compile # Compiles the files to check for errors/warnings)
$(info - make test # Run tests with buttercup)
$(info - make test-local # Test locally (compile, test, lint))
$(info - make lint # Clean autoloads and run linters)
$(info - make emacs # Run Emacs with package and dependencies installed)
$(info )
@echo > /dev/null
all: clean package install compile lint test
clean:
@printf '\n\e[1;34m%-10s\e[0m\n\n' '>> CLEAN ALL'
@$(EASK) clean all
package:
@printf '\n\e[1;34m%-10s\e[0m\n\n' '>> PACKAGING'
@$(EASK) package
install:
@printf '\n\e[1;34m%-10s\e[0m\n\n' '>> INSTALL'
@$(EASK) install
compile:
@printf '\n\e[1;34m%-10s\e[0m\n\n' '>> COMPILE'
@$(EASK) recompile
test:
@printf '\n\e[1;34m%-10s\e[0m\n\n' '>> TEST'
@$(EASK) install-deps --dev
@$(EASK) test buttercup
test-local: compile test lint
lint:
@printf '\n\e[1;34m%-10s\e[0m\n\n' '>> LINT'
@$(EASK) clean autoloads --verbose 0
@printf '\e[1;34m%-10s\e[0m\n\n' '>>> package-lint'
@$(EASK) lint package --verbose 0
@printf '\e[1;34m%-10s\e[0m\n\n' '>>> elint'
@$(EASK) lint elint --verbose 0
@printf '\e[1;34m%-10s\e[0m\n\n' '>>> checkdoc'
@$(EASK) lint checkdoc --verbose 0
@printf '\e[1;34m%-10s\e[0m\n' '>>> indent-lint'
@$(EASK) lint indent --verbose 0
@printf '\e[1;34m%-10s\e[0m\n\n' '>>> relint'
@$(EASK) lint regexps --verbose 0
docker-test:
ifndef emacs
$(error emacs is undefined. Use 'make docker-test emacs=<version>')
endif
@printf '\n\e[1;34m%-10s\e[0m\n\n' '>> COMPILE'
$(EASK) docker $(emacs) recompile
@printf '\n\e[1;34m%-10s\e[0m\n\n' '>> TEST'
$(EASK) docker $(emacs) install-deps --dev
$(EASK) docker $(emacs) test buttercup
$(EASK) docker $(emacs) clean autoloads
@printf '\n\e[1;34m%-10s\e[0m\n\n' '>> LINT'
$(EASK) docker $(emacs) lint package --verbose 0
$(EASK) docker $(emacs) lint elint --verbose 0
$(EASK) docker $(emacs) lint checkdoc --verbose 0
$(EASK) docker $(emacs) lint indent --verbose 0
$(EASK) docker $(emacs) lint regexps --verbose 0
emacs:
@printf '\n\e[1;34m%-10s\e[0m\n\n' '>> RUN EMACS'
$(EASK) install
$(EASK) emacs &