summaryrefslogtreecommitdiff
path: root/lib/hol
diff options
context:
space:
mode:
authorAlasdair2019-02-02 00:10:27 +0000
committerAlasdair2019-02-02 00:10:27 +0000
commit38befd6856101fb7a7a4b49dcb0306dc9dd2f64f (patch)
treed8abbace91daa7ab39e77d2c01ee20f1602a87ce /lib/hol
parent2f8dd66dcaec500561f8736c98bebf65938fa608 (diff)
parent4f45f462333c5494a84886677bc78a49c84da081 (diff)
Merge remote-tracking branch 'origin/sail2' into asl_flow2
Diffstat (limited to 'lib/hol')
-rw-r--r--lib/hol/Holmakefile8
-rw-r--r--lib/hol/Makefile4
2 files changed, 7 insertions, 5 deletions
diff --git a/lib/hol/Holmakefile b/lib/hol/Holmakefile
index 8e8403f3..0da5813f 100644
--- a/lib/hol/Holmakefile
+++ b/lib/hol/Holmakefile
@@ -1,3 +1,5 @@
+# Ensure LEM_DIR is set before running Holmake, e.g., by using the accompanying Makefile
+
LEM_SCRIPTS = sail2_instr_kindsScript.sml sail2_valuesScript.sml sail2_operatorsScript.sml \
sail2_operators_mwordsScript.sml sail2_operators_bitlistsScript.sml \
sail2_state_monadScript.sml sail2_stateScript.sml sail2_promptScript.sml sail2_prompt_monadScript.sml \
@@ -10,9 +12,7 @@ SCRIPTS = $(LEM_SCRIPTS) \
THYS = $(patsubst %Script.sml,%Theory.uo,$(SCRIPTS))
-LEMDIR=../../../lem/hol-lib
-
-INCLUDES = $(LEMDIR)
+INCLUDES = $(LEM_DIR)/hol-lib
all: $(THYS)
.PHONY: all
@@ -23,7 +23,7 @@ ifdef POLY
HOLHEAP = sail-heap
EXTRA_CLEANS = $(LEM_CLEANS) $(HOLHEAP) $(HOLHEAP).o
-BASE_HEAP = $(LEMDIR)/lemheap
+BASE_HEAP = $(LEM_DIR)/hol-lib/lemheap
$(HOLHEAP): $(BASE_HEAP)
$(protect $(HOLDIR)/bin/buildheap) -o $(HOLHEAP) -b $(BASE_HEAP)
diff --git a/lib/hol/Makefile b/lib/hol/Makefile
index 783ef23d..c863a05b 100644
--- a/lib/hol/Makefile
+++ b/lib/hol/Makefile
@@ -1,3 +1,5 @@
+LEM_DIR?=$(shell opam config var lem:share)
+
LEMSRC = \
../../src/lem_interp/sail2_instr_kinds.lem \
../../src/gen_lib/sail2_values.lem \
@@ -25,7 +27,7 @@ $(SCRIPTS): $(LEMSRC)
lem -hol -outdir . -auxiliary_level none -lib ../../src/lem_interp -lib ../../src/gen_lib $(LEMSRC)
$(THYS) sail-heap: $(SCRIPTS)
- Holmake
+ LEM_DIR=$(LEM_DIR) Holmake
# Holmake will also clear out the generated $(SCRIPTS) files
clean: