-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
65 lines (55 loc) · 1.83 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
SCRIPTS=./bin/installer \
src/mulle-sourcetree-action.sh \
src/mulle-sourcetree-bash-completion.sh \
src/mulle-sourcetree-callback.sh \
src/mulle-sourcetree-cfg.sh \
src/mulle-sourcetree-clean.sh \
src/mulle-sourcetree-commands.sh \
src/mulle-sourcetree-config.sh \
src/mulle-sourcetree-craftorder.sh \
src/mulle-sourcetree-db.sh \
src/mulle-sourcetree-dbstatus.sh \
src/mulle-sourcetree-diff.sh \
src/mulle-sourcetree-dotdump.sh \
src/mulle-sourcetree-environment.sh \
src/mulle-sourcetree-eval-add.sh \
src/mulle-sourcetree-fetch.sh \
src/mulle-sourcetree-filter.sh \
src/mulle-sourcetree-fix.sh \
src/mulle-sourcetree-list.sh \
src/mulle-sourcetree-node.sh \
src/mulle-sourcetree-nodeline.sh \
src/mulle-sourcetree-nodemarks.sh \
src/mulle-sourcetree-reset.sh \
src/mulle-sourcetree-reuuid.sh \
src/mulle-sourcetree-rewrite.sh \
src/mulle-sourcetree-status.sh \
src/mulle-sourcetree-sync.sh \
src/mulle-sourcetree-test.sh \
src/mulle-sourcetree-update.sh \
src/mulle-sourcetree-walk.sh \
src/mulle-sourcetree-wrap.sh
CHECKSTAMPS=$(SCRIPTS:.sh=.chk)
#
# catch some more glaring problems, the rest is done with sublime
#
SHELLFLAGS=-x -e SC2016,SC2034,SC2086,SC2164,SC2166,SC2006,SC1091,SC2039,SC2181,SC2059,SC2196,SC2197 -s sh
.PHONY: all
.PHONY: clean
.PHONY: shellcheck_check
%.chk: %.sh
- shellcheck $(SHELLFLAGS) $<
(shellcheck -f json $(SHELLFLAGS) $< | jq '.[].level' | grep -w error > /dev/null ) && exit 1 || touch $@
all: $(CHECKSTAMPS) mulle-sourcetree.chk shellcheck_check jq_check
mulle-sourcetree.chk: mulle-sourcetree
- shellcheck $(SHELLFLAGS) $<
(shellcheck -f json $(SHELLFLAGS) $< | jq '.[].level' | grep -w error > /dev/null ) && exit 1 || touch $@
installer:
@ ./bin/installer
clean:
@- rm src/*.chk
@- rm *.chk
shellcheck_check:
which shellcheck || brew install shellcheck
jq_check:
which shellcheck || brew install shellcheck