forked from CakeML/cakeml
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathHolmakefile
50 lines (35 loc) · 1.52 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
OPTIONS = QUIT_ON_FAILURE
INCLUDES = .. $(HOLDIR)/examples/formal-languages/context-free $(HOLDIR)/examples/fun-op-sem/lprefix_lub ../lem_lib_stub ffi
THYFILES = $(patsubst %Script.sml,%Theory.uo,$(wildcard *.sml))
TARGETS = $(patsubst %.sml,%.uo,$(THYFILES))
all: $(TARGETS) addancs
.PHONY: all
#LEM_OPT = -wl_pat_comp ign -wl_pat_exh ign -wl_pat_fail ign -wl_unused_vars ign
LEM_OPT = -wl_unused_vars ign
SRC = semanticPrimitives evaluate typeSystem primTypes
LEMS = $(patsubst %,%.lem,$(SRC))
GENS = $(patsubst %,%Script.sml,$(SRC))
LEM_CMD = lem $(LEM_OPT) -suppress_renaming -auxiliary_level none -i ../lib.lem -i ffi/ffi.lem -hol
$(GENS): $(LEMS) ../lib.lem ffi/ffi.lem
if type lem;\
then $(LEM_CMD) $(LEMS);\
else touch $(GENS); fi
astScript.sml: ast.lem ../lib.lem ffi/ffi.lem addancs
if type lem; then \
$(LEM_CMD) $< ; ./addancs $@ integer words string ; \
else touch astScript.sml ; fi
tokensScript.sml: tokens.lem ../lib.lem ffi/ffi.lem addancs
if type lem; then \
$(LEM_CMD) $< ; ./addancs $@ integer string ; \
else touch $@ ; fi
ifdef POLY
HOLHEAP = heap
EXTRA_CLEANS = $(HOLHEAP) $(HOLHEAP).o addancs
BARE_THYS = ../preamble $(HOLDIR)/examples/formal-languages/context-free/grammarLib ../basicComputeLib ffi/ffiTheory $(HOLDIR)/examples/fun-op-sem/lprefix_lub/lprefix_lubTheory
DEPS = $(patsubst %,%.uo,$(BARE_THYS))
all: $(HOLHEAP)
addancs: addancs.sml
$(POLYC) -o $@ $<
$(HOLHEAP): $(DEPS)
$(protect $(HOLDIR)/bin/buildheap) -o $(HOLHEAP) $(BARE_THYS) ASCIInumbersTheory
endif