-
Notifications
You must be signed in to change notification settings - Fork 0
/
IsaMakefile
65 lines (51 loc) · 1.78 KB
/
IsaMakefile
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
#
# Copyright 2014, NICTA
#
# This software may be distributed and modified according to the terms of
# the BSD 2-Clause license. Note that NO WARRANTY is provided.
# See "LICENSE_BSD2.txt" for details.
#
# @TAG(NICTA_BSD)
#
# Path to our directory.
ifndef CPARSER_PFX
CPARSER_PFX := $(realpath $(dir $(lastword $(MAKEFILE_LIST))))
endif
# Path to "map_sep" directory.
ifndef MAPPED_SEP_PFX
MAPPED_SEP_PFX = $(realpath $(CPARSER_PFX)/../map_sep/logic)
endif
# Include SML compiler configuration.
include $(CPARSER_PFX)/globalmakevars
# All targets.
all: CParser cparser_test cparser_tools
# Build tools
cparser_tools: $(CPARSER_PFX)/standalone-parser/c-parser \
$(CPARSER_PFX)/standalone-parser/tokenizer
# Setup heaps we use.
HEAPS += Simpl-VCG CParser
# Setup rules for the heaps.
$(HEAPS): .FORCE
$(ISABELLE_TOOL) build -d ../.. -b -v $@
.PHONY: $(HEAPS)
#
# cparser_test: Execute a large number of testcases in the "testfiles"
# directory.
#
# We dynamically generate a ROOT file containing all the test files, and
# then build it using Isabelle.
#
cparser_test: testfiles/ROOT .FORCE
$(ISABELLE_TOOL) build -d ../.. -d testfiles -b -v CParserTest
testfiles/ROOT: testfiles testfiles/*.c testfiles/*.thy ../../misc/scripts/gen_isabelle_root.py
python ../../misc/scripts/gen_isabelle_root.py -i testfiles -o testfiles/ROOT -s CParserTest -b CParser
all_tests.thy: testfiles testfiles/*.c ../../misc/scripts/gen_isabelle_root.py
python ../../misc/scripts/gen_isabelle_root.py -T -o $@ -b CParser -i testfiles
GRAMMAR_PRODUCTS = l4c.lex.sml l4c.grm.sml l4c.grm.sig
include $(CPARSER_PFX)/standalone-parser/Makefile
include $(CPARSER_PFX)/Makefile
# Regression targets.
report-regression:
@echo CParser cparser_test cparser_tools
.FORCE:
.PHONY: all cparser_test .FORCE report_regression cparser_tools