11# Settings
22# --------
33
4- deps_dir := deps
5- KWASM_SUBMODULE := $(deps_dir ) /wasm-semantics
6- eei_submodule := $(deps_dir ) /eei-semantics
4+ DEPS_DIR := deps
5+ KWASM_SUBMODULE := $(DEPS_DIR ) /wasm-semantics
6+ eei_submodule := $(DEPS_DIR ) /eei-semantics
77k_submodule := $(KWASM_SUBMODULE ) /deps/k
88
99ifneq (,$(wildcard $(k_submodule ) /k-distribution/target/release/k/bin/* ) )
@@ -23,18 +23,9 @@ DEFN_DIR := $(build_dir)/defn
2323kompiled_dir_name := ewasm-test
2424
2525KWASM_MAKE := make --directory $(KWASM_SUBMODULE ) BUILD_DIR=../../$(BUILD_DIR ) RELEASE=$(RELEASE )
26- eei_make := make --directory $(eei_submodule ) DEFN_DIR=../../$(DEFN_DIR )
27-
28- pandoc_tangle_submodule := $(KWASM_SUBMODULE ) /deps/pandoc-tangle
29- tangler := $(pandoc_tangle_submodule ) /tangle.lua
30- LUA_PATH := $(pandoc_tangle_submodule ) /?.lua;;
31- export LUA_PATH
32-
33- .PHONY : all clean \
34- deps haskell-deps \
35- defn defn-llvm defn-haskell \
36- definition-deps wasm-definitions eei-definitions \
37- build \
26+
27+ .PHONY : all clean
28+ deps defn build \
3829 test test-execution test-simple test-prove \
3930 media presentations reports
4031
@@ -43,6 +34,7 @@ all: build
4334clean :
4435 rm -rf $(build_dir )
4536 rm -f $(KWASM_SUBMODULE ) /make.timestamp
37+ rm -f $(KWASM_SUBMODULE ) /make.timestamp
4638 rm -f $(eei_submodule ) /make.timestamp
4739 git submodule update --init --recursive
4840 $(MAKE ) clean -C $(KWASM_SUBMODULE )
@@ -51,37 +43,13 @@ clean:
5143# Build Dependencies (K Submodule)
5244# --------------------------------
5345
54- wasm_files =test.md wasm.md wasm-text.md data.md kwasm-lemmas.md
55- wasm_source_files: =$(patsubst % , $(KWASM_SUBMODULE ) /% , $(wasm_files ) )
56- eei_files: =eei.md
57- eei_source_files: =$(patsubst % , $(eei_submodule ) /% , $(eei_files ) )
58- ewasm_files: =ewasm-test.md driver.md ewasm.md kewasm-lemmas.md
59- ewasm_source_files: =$(ewasm_files )
60- all_k_files: =$(ewasm_files ) $(wasm_files ) $(eei_files )
61-
62- llvm_dir: =$(DEFN_DIR ) /llvm
63- llvm_defn: =$(patsubst % , $(llvm_dir ) /% , $(all_k_files ) )
64-
65- haskell_dir: =$(DEFN_DIR ) /haskell
66- haskell_defn: =$(patsubst % , $(haskell_dir ) /% , $(all_k_files ) )
46+ EEI_FILES: =eei.md
47+ EEI_SOURCE_FILES: =$(patsubst % , $(eei_submodule ) /% , $(EEI_FILES ) )
48+ EWASM_FILES: =ewasm-test.md driver.md ewasm.md kewasm-lemmas.md
49+ EWASM_SOURCE_FILES: =$(EWASM_FILES )
6750
68- definition-deps : eei-definitions
69- deps : $(KWASM_SUBMODULE ) /make.timestamp $(eei_submodule ) /make.timestamp definition-deps
70-
71- wasm-definitions :
72- $(KWASM_MAKE ) -B defn-llvm
73- $(KWASM_MAKE ) -B defn-haskell
74-
75- eei-definitions : $(eei_source_files )
76- $(eei_make ) -B defn-llvm
77- $(eei_make ) -B defn-haskell
78-
79- $(KWASM_SUBMODULE ) /make.timestamp : $(wasm_source_files )
51+ deps :
8052 $(KWASM_MAKE ) deps
81- touch $(KWASM_SUBMODULE ) /make.timestamp
82-
83- $(eei_submodule ) /make.timestamp : $(eei_source_files )
84- touch $(eei_submodule ) /make.timestamp
8553
8654# Building Definition
8755# -------------------
@@ -97,7 +65,7 @@ KOMPILE_OPTS :=
9765build : build-llvm build-haskell
9866
9967build-% :
100- cp $(eei_source_files ) $(ewasm_source_files ) $(KWASM_SUBMODULE )
68+ cp $(EEI_SOURCE_FILES ) $(EWASM_SOURCE_FILES ) $(KWASM_SUBMODULE )
10169 $(KWASM_MAKE ) build-$* \
10270 DEFN_DIR=../../$(DEFN_DIR ) \
10371 llvm_main_module=$(MAIN_MODULE ) \
@@ -106,7 +74,7 @@ build-%:
10674 haskell_main_module=$(MAIN_MODULE ) \
10775 haskell_syntax_module=$(MAIN_SYNTAX_MODULE ) \
10876 haskell_main_file=$(MAIN_DEFN_FILE ) \
109- EXTRA_SOURCE_FILES=" $( eei_files ) $( ewasm_files ) " \
77+ EXTRA_SOURCE_FILES=" $( EEI_FILES ) $( EWASM_FILES ) " \
11078 KOMPILE_OPTS=" $( KOMPILE_OPTS) "
11179
11280# Testing
0 commit comments