summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/isabelle/Makefile9
-rw-r--r--test/isabelle/Makefile9
2 files changed, 14 insertions, 4 deletions
diff --git a/lib/isabelle/Makefile b/lib/isabelle/Makefile
index 3ce9b9d8..a1500292 100644
--- a/lib/isabelle/Makefile
+++ b/lib/isabelle/Makefile
@@ -7,6 +7,11 @@ EXTRA_THYS = Sail2_state_monad_lemmas.thy Sail2_state_lemmas.thy \
Sail2_prompt_monad_lemmas.thy \
Sail2_operators_mwords_lemmas.thy Hoare.thy
+LEM_ISA_LIB?=$(shell opam config var lem:share)/isabelle-lib
+ifeq ($(wildcard $(LEM_ISA_LIB)/ROOT),)
+$(error isabelle-lib directory of Lem not found. Please set the LEM_ISA_LIB environment variable)
+endif
+
RISCV ?= ../../../sail-riscv
.PHONY: all heap-img clean
@@ -16,12 +21,12 @@ all: thys
thys: $(THYS)
heap-img: thys $(EXTRA_THYS) ROOT
- isabelle build -D .
+ isabelle build -d $(LEM_ISA_LIB) -D .
manual: heap-img manual/Manual.thy manual/ROOT manual/document/root.tex
cp output/document/session_graph.pdf manual/document/Sail_session_graph.pdf
make -C $(RISCV) riscv_duopod
- isabelle build -d . -d $(RISCV)/generated_definitions/isabelle -D manual
+ isabelle build -d $(LEM_ISA_LIB) -d . -d $(RISCV)/generated_definitions/isabelle -D manual
Sail2_instr_kinds.thy: ../../src/lem_interp/sail2_instr_kinds.lem
lem -isa -outdir . -auxiliary_level none -lib ../../src/lem_interp -lib ../../src/gen_lib $<
diff --git a/test/isabelle/Makefile b/test/isabelle/Makefile
index 5df82977..1f488db1 100644
--- a/test/isabelle/Makefile
+++ b/test/isabelle/Makefile
@@ -1,8 +1,13 @@
-ISA_LIB_DIR = ../../lib/isabelle
+LEM_ISA_LIB?=$(shell opam config var lem:share)/isabelle-lib
+ifeq ($(wildcard $(LEM_ISA_LIB)/ROOT),)
+$(error isabelle-lib directory of Lem not found. Please set the LEM_ISA_LIB environment variable)
+endif
+
+SAIL_ISA_LIB = ../../lib/isabelle
CHERI_DIR ?= ../../../sail-cheri-mips/cheri
AARCH64_DIR ?= ../../aarch64
TGTS = run_cheri.native run_aarch64.native
-SESSION_DIRS = -d $(ISA_LIB_DIR) -d $(CHERI_DIR) -d $(AARCH64_DIR) -d .
+SESSION_DIRS = -d $(LEM_ISA_LIB) -d $(SAIL_ISA_LIB) -d $(CHERI_DIR) -d $(AARCH64_DIR) -d .
.PHONY: all clean