Skip to content

Commit 2f816be

Browse files
added new lines for make files
1 parent 68b7c17 commit 2f816be

File tree

2 files changed

+55
-0
lines changed

2 files changed

+55
-0
lines changed

Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ hol: hol/p4Script.sml hol/ottScript.sml hol/ottLib.sig hol/ottLib.sml
1111
hol/p4_from_json: hol
1212
Holmake -r -I hol/p4_from_json
1313

14+
policy_to_table: hol
15+
Holmake -r -I hol -I hol/policy_to_table
16+
1417
validate: hol/p4_from_json
1518
cd hol/p4_from_json && ./validate.sh
1619

hol/policy_to_table/Holmakefile

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# includes
2+
# ----------------------------------
3+
DEPENDENCIES = ..
4+
5+
6+
# configuration
7+
# ----------------------------------
8+
HOLHEAP = ../p4-heap
9+
NEWHOLHEAP = table_to_policy-heap
10+
11+
HEAPINC_EXTRA = wordsLib
12+
13+
14+
# included lines follow
15+
# ----------------------------------
16+
17+
# automatic Holmake targets (all theories and non-"Script.sml" .sml files)
18+
# automatic heap inclusion by name pattern
19+
# ----------------------------------
20+
SMLFILES = $(subst *.sml,, $(patsubst %Script.sml,%Theory.sml,$(wildcard *.sml)))
21+
TARGETS = $(patsubst %.sml,%.uo,$(SMLFILES))
22+
23+
HEAPINC = $(subst *Theory,,$(patsubst %Script.sml,%Theory ,$(wildcard *Script.sml))) \
24+
$(subst *Syntax,,$(patsubst %.sml,% ,$(wildcard *Syntax.sml))) \
25+
$(subst *Simps,, $(patsubst %.sml,% ,$(wildcard *Simps.sml ))) \
26+
$(subst *Lib,, $(patsubst %.sml,% ,$(wildcard *Lib.sml ))) \
27+
$(HEAPINC_EXTRA)
28+
29+
30+
# general configs
31+
# ----------------------------------
32+
all: $(TARGETS) $(if $(NEWHOLHEAP),$(NEWHOLHEAP),)
33+
34+
INCLUDES = $(DEPENDENCIES) $(if $(HOLHEAP),$(shell dirname $(HOLHEAP)),)
35+
36+
EXTRA_CLEANS = $(if $(NEWHOLHEAP),$(NEWHOLHEAP) $(NEWHOLHEAP).o,) $(wildcard *.exe)
37+
38+
OPTIONS = QUIT_ON_FAILURE
39+
40+
default: all
41+
42+
.PHONY: all default
43+
44+
45+
# holheap part
46+
# ----------------------------------
47+
ifdef POLY
48+
49+
$(NEWHOLHEAP): $(TARGETS) $(HOLHEAP)
50+
$(protect $(HOLDIR)/bin/buildheap) $(if $(HOLHEAP),-b $(HOLHEAP),) -o $@ $(HEAPINC)
51+
52+
endif

0 commit comments

Comments
 (0)