summaryrefslogtreecommitdiff
path: root/tests/lean/Makefile
diff options
context:
space:
mode:
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