From df4d60b71bcabf9897656d6d74157a4c7d8d539c Mon Sep 17 00:00:00 2001 From: Son Ho Date: Tue, 16 May 2023 11:45:43 +0200 Subject: Make good progress on generating code for HOL4 --- tests/hol4/Holmakefile.template | 3 +++ tests/hol4/Makefile | 39 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+) create mode 100644 tests/hol4/Holmakefile.template create mode 100644 tests/hol4/Makefile (limited to 'tests/hol4') diff --git a/tests/hol4/Holmakefile.template b/tests/hol4/Holmakefile.template new file mode 100644 index 00000000..c86fad70 --- /dev/null +++ b/tests/hol4/Holmakefile.template @@ -0,0 +1,3 @@ + +all: $(DEFAULT_TARGETS) +.PHONY: all diff --git a/tests/hol4/Makefile b/tests/hol4/Makefile new file mode 100644 index 00000000..fa2c5512 --- /dev/null +++ b/tests/hol4/Makefile @@ -0,0 +1,39 @@ +ALL_DIRS ?= $(filter-out %~ Makefile% Holmakefile%, $(wildcard *)) + +UPDATE_DIRS = $(addprefix update-,$(ALL_DIRS)) + +VERIFY_DIRS = $(addprefix verif-,$(ALL_DIRS)) + +CLEAN_DIRS = $(addprefix clean-,$(ALL_DIRS)) + +COPY_HOLMAKEFILE = $(addprefix copy-holmakefile-,$(ALL_DIRS)) + +# This allows to customize the INCLUDES variable of the Holmakefile - useful for Nix +HOLMAKEFILE_INCLUDES ?= ../../../backends/hol4 + +.PHONY: all +all: prepare-projects verify + +.PHONY: prepare-projects +prepare-projects: $(COPY_HOLMAKEFILE) + +.PHONY: prepare-projects +copy-holmakefile-%: + rm -f $*/Holmakefile + echo "# This file was automatically generated - modify ../Holmakefile.template instead" >> $*/Holmakefile + echo "INCLUDES = " $(HOLMAKEFILE_INCLUDES) >> $*/Holmakefile + cat Holmakefile.template >> $*/Holmakefile + +.PHONY: verify +verify: $(VERIFY_DIRS) + +.PHONY: verif-% +verif-%: + cd $* && Holmake + +.PHONY: clean +clean: $(CLEAN_DIRS) + +.PHONY: clean-% +clean-%: + cd $* && Holmake clean -- cgit v1.2.3