diff options
author | Son Ho | 2023-05-16 11:45:43 +0200 |
---|---|---|
committer | Son HO | 2023-06-04 21:54:38 +0200 |
commit | df4d60b71bcabf9897656d6d74157a4c7d8d539c (patch) | |
tree | 3cbf4a825484f962339e78313646cd1f1724192e /tests/hol4 | |
parent | b1dd8274d7a1cff2b9427e4356b66c4e63fe498c (diff) |
Make good progress on generating code for HOL4
Diffstat (limited to 'tests/hol4')
-rw-r--r-- | tests/hol4/Holmakefile.template | 3 | ||||
-rw-r--r-- | tests/hol4/Makefile | 39 |
2 files changed, 42 insertions, 0 deletions
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 |