summaryrefslogtreecommitdiff
path: root/tests/lean/Makefile
diff options
context:
space:
mode:
authorSon Ho2023-03-07 17:49:03 +0100
committerSon HO2023-06-04 21:44:33 +0200
commit4db56fe2c963a4052f8415b3985c8765407fccbc (patch)
tree53c5f05469bb3946547c418176f35d840dbe6012 /tests/lean/Makefile
parent051e2a19f3268d272a0acd0425d2107ebea020c5 (diff)
Update the extraction of Lean files
Diffstat (limited to 'tests/lean/Makefile')
-rw-r--r--tests/lean/Makefile40
1 files changed, 40 insertions, 0 deletions
diff --git a/tests/lean/Makefile b/tests/lean/Makefile
new file mode 100644
index 00000000..ed3b3e3b
--- /dev/null
+++ b/tests/lean/Makefile
@@ -0,0 +1,40 @@
+ALL_DIRS ?= $(filter-out %~ lean-toolchain% Makefile%, $(wildcard *))
+
+UPDATE_DIRS = $(addprefix update-,$(ALL_DIRS))
+
+VERIFY_DIRS = $(addprefix verif-,$(ALL_DIRS))
+
+CLEAN_DIRS = $(addprefix clean-,$(ALL_DIRS))
+
+COPY_LEAN_TOOLCHAIN = $(addprefix copy-lean-toolchain-,$(ALL_DIRS))
+
+.PHONY: all
+all: prepare-projects verify
+
+.PHONY: prepare-projects
+prepare-projects: $(COPY_LEAN_TOOLCHAIN)
+
+.PHONY: prepare-projects
+copy-lean-toolchain-%:
+ cp lean-toolchain $*
+
+.PHONY: update
+update: $(UPDATE_DIRS)
+
+.PHONY: update-%
+update-%:
+ cd $* && lake update
+
+.PHONY: verify
+verify: $(VERIFY_DIRS)
+
+.PHONY: verif-%
+verif-%:
+ cd $* && lake build
+
+.PHONY: clean
+clean: $(CLEAN_DIRS)
+
+.PHONY: clean-%
+clean-%:
+ cd $* && lake clean