-
-
Notifications
You must be signed in to change notification settings - Fork 15
/
Makefile.repo
55 lines (41 loc) · 1.45 KB
/
Makefile.repo
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
GENERATED=t/.last_run perl-cve-atom.xml generated_reports
CVE_FEED_FILE=perl-cve-atom.xml
.DEFAULT_GOAL := help
.PHONY: invert
invert: ## turn the external_reports into CPANSA-style reports
perl util/invert-third-party.pl
.PHONY: clean
clean: ## clean out generated files
rm -rf $(GENERATED)
.PHONY: lint
lint: invert ## lint the reports
perl util/lint_reports
.PHONY: pm
pm: perl-module/lib/CPAN/Audit/DB.pm ## create DB.pm
perl-module/lib/CPAN/Audit/DB.pm:
perl util/generate -o $@
.PHONY: feed
feed: $(CVE_FEED_FILE)
$(CVE_FEED_FILE):
perl util/make_feed > $@
.PHONY: setup
setup: ## setup the environment to use these tools
cpanm --installdeps .
.PHONY: sync
sync:
cp ../cpan-audit/lib/CPAN/Audit/DB.pm perl-module/lib/CPAN/Audit/DB.pm
cp ../cpan-audit/lib/CPAN/Audit/DB.pm.gpg perl-module/lib/CPAN/Audit/DB.pm.gpg
.PHONY: test
test: ## run all tests (with current env)
prove -b -r t
.PHONY: test_all
test_all: ## test all YAML files
env TEST_CHANGED_ONLY=0 prove -b -r t
.PHONY: test_new
test_new: ## only test the new YAML files
env TEST_CHANGED_ONLY=1 prove -b -r t
######################################################################
# https://marmelab.com/blog/2016/02/29/auto-documented-makefile.html
.PHONY: help ## Show all the Makefile targets with descriptions
help: ## show a list of targets
@grep -E '^[a-zA-Z][/a-zA-Z0-9_.-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}'