-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
55 lines (43 loc) · 1.75 KB
/
Makefile
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
50
51
52
53
54
55
COQMODULE := relive
COQTHEORIES := src/lib/*.v src/basic/*.v src/equivalence/*/*.v src/equivalence/*.v src/termination/*.v src/robustness/*.v
.PHONY: all theories clean tounicode
all: build
build: Makefile.coq
$(MAKE) -f Makefile.coq all
quick: Makefile.coq
$(MAKE) -f Makefile.coq quick
quick-check: Makefile.coq
$(MAKE) -f Makefile.coq vio2vo J=6
Makefile.coq: Makefile $(COQTHEORIES)
(echo "-R src $(COQMODULE)"; \
echo $(COQTHEORIES)) > _CoqProject
coq_makefile -f _CoqProject -o Makefile.coq
%.vo: Makefile.coq
$(MAKE) -f Makefile.coq "$@"
%.vio: Makefile.coq
$(MAKE) -f Makefile.coq "$@"
clean:
$(MAKE) -f Makefile.coq clean
rm -f _CoqProject Makefile.coq
tounicode:
sed -i 's/<</⟪/g' $(COQTHEORIES)
sed -i 's/>>/⟫/g' $(COQTHEORIES)
sed -i 's/;;/⨾/g' $(COQTHEORIES)
sed -i 's/<|/⦗/g' $(COQTHEORIES)
sed -i 's/|>/⦘/g' $(COQTHEORIES)
sed -i 's/\^+/⁺/g' $(COQTHEORIES)
sed -i 's/\^\*/*/g' $(COQTHEORIES)
# Install build-dependencies
build-dep/opam: opam Makefile
@echo "# Creating build-dep package."
@mkdir -p build-dep
@sed <opam -E 's/^(build|install|remove):.*/\1: []/; s/^name: *"(.*)" */name: "\1-builddep"/' >build-dep/opam
@fgrep builddep build-dep/opam >/dev/null || (echo "sed failed to fix the package name" && exit 1) # sanity check
build-dep: build-dep/opam phony
@# We want opam to not just instal the build-deps now, but to also keep satisfying these
@# constraints. Otherwise, `opam upgrade` may well update some packages to versions
@# that are incompatible with our build requirements.
@# To achieve this, we create a fake opam package that has our build-dependencies as
@# dependencies, but does not actually install anything itself.
@echo "# Installing build-dep package."
@opam install $(OPAMFLAGS) build-dep/