blob: cef04acaafdca7372c13cde126b6f77c12198d4f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
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
AENEAS_PRIMITIVES ?= ../../backends/hol4
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
# There are racing issues with Holmake: if we run several builds in parallel,
# Holmake will complain that the dependencies (in `aeneas/backends/hol4` are
# not built). For this reason, we add this rule which enforces that *one*
# Holmake process builds the dependencies, before the test subdirectories
# (hashmap, etc.) are built in parallel.
.PHONY: verify-primitives
verify-primitives:
cd $(AENEAS_PRIMITIVES) && Holmake
.PHONY: verify
verify: $(VERIFY_DIRS)
.PHONY: verif-%
verif-%: verify-primitives
cd $* && Holmake
.PHONY: clean
clean: $(CLEAN_DIRS)
.PHONY: clean-%
clean-%:
cd $* && Holmake clean
|