-
Notifications
You must be signed in to change notification settings - Fork 0
/
Holmakefile
52 lines (34 loc) · 1.5 KB
/
Holmakefile
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
# includes
# ----------------------------------
DEPENDENCIES = ..
# configuration
# ----------------------------------
HOLHEAP = ../p4-heap
NEWHOLHEAP = p4_from_json-heap
HEAPINC_EXTRA = wordsLib
# included lines follow
# ----------------------------------
# automatic Holmake targets (all theories and non-"Script.sml" .sml files)
# automatic heap inclusion by name pattern
# ----------------------------------
SMLFILES = $(subst *.sml,, $(patsubst %Script.sml,%Theory.sml,$(wildcard *.sml)))
TARGETS = $(patsubst %.sml,%.uo,$(SMLFILES))
HEAPINC = $(subst *Theory,,$(patsubst %Script.sml,%Theory ,$(wildcard *Script.sml))) \
$(subst *Syntax,,$(patsubst %.sml,% ,$(wildcard *Syntax.sml))) \
$(subst *Simps,, $(patsubst %.sml,% ,$(wildcard *Simps.sml ))) \
$(subst *Lib,, $(patsubst %.sml,% ,$(wildcard *Lib.sml ))) \
$(HEAPINC_EXTRA)
# general configs
# ----------------------------------
all: $(TARGETS) $(if $(NEWHOLHEAP),$(NEWHOLHEAP),)
INCLUDES = $(DEPENDENCIES) $(if $(HOLHEAP),$(shell dirname $(HOLHEAP)),)
EXTRA_CLEANS = $(if $(NEWHOLHEAP),$(NEWHOLHEAP) $(NEWHOLHEAP).o,) $(wildcard *.exe)
OPTIONS = QUIT_ON_FAILURE
default: all
.PHONY: all default
# holheap part
# ----------------------------------
ifdef POLY
$(NEWHOLHEAP): $(TARGETS) $(HOLHEAP)
$(protect $(HOLDIR)/bin/buildheap) $(if $(HOLHEAP),-b $(HOLHEAP),) -o $@ $(HEAPINC)
endif