-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathCoqMakefile.local
67 lines (58 loc) · 2.53 KB
/
CoqMakefile.local
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
56
57
58
59
60
61
62
63
64
65
66
67
FILENAMES = $(notdir $(VFILES:.v=))
DPDFILES = $(VFILES:.v=.dpd)
DOTFILES = $(VFILES:.v=.dot)
SVGFILES = $(VFILES:.v=.svg)
%.svg: %.dot
$(SHOW)'DOT -Tsvg -o $@ $<'
$(HIDE)dot -Tsvg -o $@ $<
%.dot: %.dpd
$(SHOW)'DPD2DOT -o $@ $<'
$(HIDE)if [ -s $< ]; then \
dpd2dot -graphname $(*F) -o $@ $< >/dev/null; \
else \
echo "digraph StringExtra {\n graph [ratio=0.5]\n node [style=filled]\n} /* END */" > $@; \
fi
$(DPDFILES): %.dpd: %.vo
$(SHOW)'DPDGRAPH examples/$<'
$(HIDE)(echo "From ConCert.Examples Require $(*F)."; echo 'Set DependGraph File "$@".'; echo 'Print FileDependGraph $(*F).') | \
$(COQTOP) $(COQFLAGS) $(COQLIBS) -require-import dpdgraph.dpdgraph >/dev/null 2>&1
examples.dpd: $(VOFILES)
$(SHOW)'DPDGRAPH examples'
$(HIDE)(echo "From ConCert.Examples Require $(FILENAMES)."; echo 'Set DependGraph File "$@".'; echo 'Print FileDependGraph $(FILENAMES).') | \
$(COQTOP) $(COQFLAGS) $(COQLIBS) -require-import dpdgraph.dpdgraph >/dev/null 2>&1
dep-graphs-svg: $(SVGFILES)
@mkdir -p svg
@$(foreach i, $(shell seq 1 3 $(words $(COQMF_COQLIBS_NOML))), \
$(foreach f, $(filter $(word $(shell expr $i + 1), $(COQMF_COQLIBS_NOML))/%, $(SVGFILES)), \
mv $f svg/$(strip $(subst /,., $(subst $(word $(shell expr $i + 1), $(COQMF_COQLIBS_NOML))/, \
$(word $(shell expr $i + 2), $(COQMF_COQLIBS_NOML))., $f)));))
dep-graphs-dot: $(DOTFILES)
@mkdir -p dot
@$(foreach i, $(shell seq 1 3 $(words $(COQMF_COQLIBS_NOML))), \
$(foreach f, $(filter $(word $(shell expr $i + 1), $(COQMF_COQLIBS_NOML))/%, $(DOTFILES)), \
mv $f dot/$(strip $(subst /,., $(subst $(word $(shell expr $i + 1), $(COQMF_COQLIBS_NOML))/, \
$(word $(shell expr $i + 2), $(COQMF_COQLIBS_NOML))., $f)));))
dep-graphs-dpd: $(DPDFILES)
@mkdir -p dpd
@$(foreach i, $(shell seq 1 3 $(words $(COQMF_COQLIBS_NOML))), \
$(foreach f, $(filter $(word $(shell expr $i + 1), $(COQMF_COQLIBS_NOML))/%, $(DPDFILES)), \
mv $f dpd/$(strip $(subst /,., $(subst $(word $(shell expr $i + 1), $(COQMF_COQLIBS_NOML))/, \
$(word $(shell expr $i + 2), $(COQMF_COQLIBS_NOML))., $f)));))
full-dep-graph-svg: examples.svg
full-dep-graph-dot: examples.dot
full-dep-graph-dpd: examples.dpd
.PHONY: clean-dpd
clean-dpd::
$(SHOW)'CLEAN'
$(HIDE)rm -f $(DPDFILES)
$(HIDE)rm -f $(DOTFILES)
$(HIDE)rm -f $(SVGFILES)
$(HIDE)rm -f examples.dpd examples.dot examples.svg
$(HIDE)rm -rf dpd
$(HIDE)rm -rf dot
$(HIDE)rm -rf svg
.PHONY: clean
clean:: clean-dpd
QuickChick:
$(SHOW)COQC AllTests.v
$(HIDE)$(TIMER) $(COQC) $(COQDEBUG) $(TIMING_ARG) $(COQFLAGS) $(COQLIBS) AllTests.v $(TIMING_EXTRA)