Skip to content

Commit a847bef

Browse files
committed
Add a Makefile for test and clean
1 parent 3c12920 commit a847bef

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

Makefile

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
SHELL := bash
2+
3+
4+
default:
5+
6+
7+
test: shellcheck bats
8+
9+
shellcheck:
10+
@echo
11+
ifneq (,$(shell command -v shellcheck))
12+
shellcheck bin/*
13+
@echo 'All bin/* files passed shellcheck'
14+
else
15+
$(warning 'shellcheck' not installed)
16+
endif
17+
18+
19+
bats:
20+
@echo
21+
ifneq (,$(shell command -v bats))
22+
bats t/
23+
else
24+
$(warning 'bats' not installed)
25+
endif
26+
27+
28+
clean:
29+
find t/test-data \
30+
-name 'MANIFEST*.bak' \
31+
-o -name 'MYMETA*' \
32+
-o -name 'Makefile' \
33+
-o -name 'blib' \
34+
-o -name 'build_dir' \
35+
-o -name 'pm_to_blib' \
36+
-o -name '_build' \
37+
-o -name 'Build' | \
38+
xargs $(RM) -r
39+
$(RM) t/test-data/extutils-makemaker-module-with-manifest.skip/MANIFEST
40+
$(RM) t/test-data/module-build_module/MANIFEST

0 commit comments

Comments
 (0)