summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorSon Ho2021-12-07 18:00:44 +0100
committerSon Ho2021-12-07 18:00:44 +0100
commit1baa776da1a452a094b34e59bd7e796b9df6fcc8 (patch)
treeda67ebe1b0d70599c9d51229ac8570b9d8856cec /Makefile
parent34eee949be4610a9e9f1d18b3e6b0afada8d9706 (diff)
Make minor modifications to the Makefile
Diffstat (limited to '')
-rw-r--r--Makefile17
1 files changed, 12 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index fd2b5f1f..03444d51 100644
--- a/Makefile
+++ b/Makefile
@@ -1,8 +1,15 @@
-# The all target builds the project and runs it on a test file (whose path
-# is currently hardcoded in main.ml). In order to check that we don't alter
-# the behaviour of the interpreter while updating it, we check that the trace
-# remains unchanged.
-all:
+all: build-run-check-trace
+
+# Build the project and run the executable
+.PHONY: build-run
+build-run:
+ dune build src/main.exe && dune exec src/main.exe
+
+# Build the project and run the executable, then check that the behaviour
+# of the interpreter didn't change by comparing the newly generated trace
+# with a reference.
+.PHONY: build-run-check-trace
+build-run-check-trace:
dune build src/main.exe && \
dune exec src/main.exe > tests/trace_current.txt && \
cmp tests/trace_reference.txt tests/trace_current.txt && \