Skip to content

Commit 50e882c

Browse files
committed
Add 'prove' command which uses gnatprove
Signed-off-by: onox <denkpadje@gmail.com>
1 parent fdda8be commit 50e882c

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Makefile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ CFLAGS ?= -O2 -march=native
33
GNATMAKE = gprbuild -dm -p
44
GNATCLEAN = gprclean -q
55
GNATINSTALL = gprinstall
6+
GNATPROVE = gnatprove --cwe --pedantic -k -j0 --output-header
67

78
PREFIX ?= /usr
89

@@ -18,7 +19,7 @@ installcmd = $(GNATINSTALL) -p \
1819
--ali-subdir=$(alidir) \
1920
--prefix=$(PREFIX)
2021

21-
.PHONY: build tests tools debug clean coverage install uninstall
22+
.PHONY: build tests tools debug clean coverage prove install uninstall
2223

2324
build:
2425
$(GNATMAKE) -P tools/json_ada.gpr -cargs $(CFLAGS)
@@ -33,10 +34,14 @@ debug:
3334
$(GNATMAKE) -P tools/json_ada.gpr -XMode=debug -cargs $(CFLAGS)
3435

3536
clean:
37+
-$(GNATPROVE) --clean -P tools/json_ada.gpr
3638
$(GNATCLEAN) -P tools/json_ada.gpr
3739
$(GNATCLEAN) -P tests/unit/unit_tests.gpr
3840
rm -rf bin build tests/unit/build test/cov TEST-*.xml
3941

42+
prove:
43+
$(GNATPROVE) --level=4 --prover=all --mode=check -P tools/json_ada.gpr
44+
4045
tests: build_test
4146
./tests/unit/test_bindings
4247

0 commit comments

Comments
 (0)