-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
50 lines (40 loc) · 1.27 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
EXTRA_DIR := coqdocjs/extra
export COQDOC := ./coqdoc.sh
######
# Forward most targets to Coq makefile (with some trick to make this phony)
%: Makefile.coq phony
@$(MAKE) -f Makefile.coq $@
# Beware: multiple targets to the top-level Makefile doesn't work robustly... instead follow this:
# https://coq.inria.fr/refman/practical-tools/utilities.html#building-a-coq-project-with-coq-makefile
# and use
# make only TGTS="foo bar"
#
all: Makefile.coq
@$(MAKE) -f Makefile.coq all
.PHONY: all
.PHONY: coq
clean: Makefile.coq
@$(MAKE) -f Makefile.coq clean
find theories tests \( -name "*.d" -o -name "*.vo*" -o -name "*.aux" -o -name "*.cache" -o -name "*.glob" -o -name "*.vio" \) -print -delete || true
rm -f Makefile.coq
.PHONY: clean
html: all
rm -fr coqdoc-old
[ -d website/coqdoc ] && mv website/coqdoc coqdoc-old || true
@$(MAKE) -f Makefile.coq $@
cp $(EXTRA_DIR)/resources/* html
cd html; ln -s ./toc.html index.html
# Create some layout in the website
mv html website/coqdoc
.PHONY: html
# Create Coq Makefile.
Makefile.coq: _CoqProject Makefile
@echo "COQ_MAKEFILE"
@"$(COQBIN)coq_makefile" -f _CoqProject -o Makefile.coq
# Some files that do *not* need to be forwarded to Makefile.coq
Makefile: ;
_CoqProject: ;
opam: ;
# Phony wildcard targets
phony: ;
.PHONY: phony