1
1
# Settings
2
2
# --------
3
3
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
7
7
k_submodule := $(KWASM_SUBMODULE ) /deps/k
8
8
9
9
ifneq (,$(wildcard $(k_submodule ) /k-distribution/target/release/k/bin/* ) )
@@ -23,18 +23,9 @@ DEFN_DIR := $(build_dir)/defn
23
23
kompiled_dir_name := ewasm-test
24
24
25
25
KWASM_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
26
33
27
.PHONY : all clean \
34
- deps haskell-deps \
35
- defn defn-llvm defn-haskell \
36
- definition-deps wasm-definitions eei-definitions \
37
- build \
28
+ deps defn build \
38
29
test test-execution test-simple test-prove \
39
30
media presentations reports
40
31
@@ -43,6 +34,7 @@ all: build
43
34
clean :
44
35
rm -rf $(build_dir )
45
36
rm -f $(KWASM_SUBMODULE ) /make.timestamp
37
+ rm -f $(KWASM_SUBMODULE ) /make.timestamp
46
38
rm -f $(eei_submodule ) /make.timestamp
47
39
git submodule update --init --recursive
48
40
$(MAKE ) clean -C $(KWASM_SUBMODULE )
@@ -51,37 +43,13 @@ clean:
51
43
# Build Dependencies (K Submodule)
52
44
# --------------------------------
53
45
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 )
67
50
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 :
80
52
$(KWASM_MAKE ) deps
81
- touch $(KWASM_SUBMODULE ) /make.timestamp
82
-
83
- $(eei_submodule ) /make.timestamp : $(eei_source_files )
84
- touch $(eei_submodule ) /make.timestamp
85
53
86
54
# Building Definition
87
55
# -------------------
@@ -97,7 +65,7 @@ KOMPILE_OPTS :=
97
65
build : build-llvm build-haskell
98
66
99
67
build-% :
100
- cp $(eei_source_files ) $(ewasm_source_files ) $(KWASM_SUBMODULE )
68
+ cp $(EEI_SOURCE_FILES ) $(EWASM_SOURCE_FILES ) $(KWASM_SUBMODULE )
101
69
$(KWASM_MAKE ) build-$* \
102
70
DEFN_DIR=../../$(DEFN_DIR ) \
103
71
llvm_main_module=$(MAIN_MODULE ) \
@@ -106,7 +74,7 @@ build-%:
106
74
haskell_main_module=$(MAIN_MODULE ) \
107
75
haskell_syntax_module=$(MAIN_SYNTAX_MODULE ) \
108
76
haskell_main_file=$(MAIN_DEFN_FILE ) \
109
- EXTRA_SOURCE_FILES=" $( eei_files ) $( ewasm_files ) " \
77
+ EXTRA_SOURCE_FILES=" $( EEI_FILES ) $( EWASM_FILES ) " \
110
78
KOMPILE_OPTS=" $( KOMPILE_OPTS) "
111
79
112
80
# Testing
0 commit comments