-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
43 lines (32 loc) · 772 Bytes
/
Makefile
File metadata and controls
43 lines (32 loc) · 772 Bytes
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
.POSIX:
.SUFFIXES:
LINT=shellcheck
TEST=./unittest
TEST_SRC=https://raw.githubusercontent.com/macie/unittest.sh/master/unittest
# MAIN TARGETS
all: test check
clean:
@echo '# Delete test runner: rm $(TEST)' >&2
@rm $(TEST)
debug:
@printf '# OS info: '
@uname -rsv;
@echo '# Development dependencies:'
@echo; $(LINT) -V || true
@echo; $(TEST) -v || true
@echo '# Environment variables:'
env || true
check: $(LINT)
@printf '# Static analysis: $(LINT) goinit' >&2
@$(LINT) goinit ./tests/*.sh
test: $(TEST)
@echo '# Unit tests: $(TEST)' >&2
@$(TEST)
# HELPERS
$(LINT):
@printf '# $@ installation path: ' >&2
@command -v $@ >&2 || { echo "ERROR: Cannot find $@" >&2; exit 1; }
$(TEST):
@echo '# Prepare $@:' >&2
curl -fLO $(TEST_SRC)
chmod +x $@