-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
37 lines (30 loc) · 856 Bytes
/
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
EXTRA_DIR:=extra
COQDOCFLAGS:= \
--external 'https://plv.mpi-sws.org/coqdoc/stdpp/' stdpp \
--toc --toc-depth 2 --html --interpolate \
--index indexpage --no-lib-name --parse-comments \
--with-header $(EXTRA_DIR)/header.html --with-footer $(EXTRA_DIR)/footer.html
export COQDOCFLAGS
COQMAKEFILE:=Makefile.coq
COQ_PROJ:=_CoqProject
VS:=$(wildcard *.v)
VS_IN_PROJ:=$(shell grep .v $(COQ_PROJ))
ifeq (,$(VS_IN_PROJ))
VS_OTHER := $(VS)
else
VS := $(VS_IN_PROJ)
endif
all: html
clean: $(COQMAKEFILE)
@$(MAKE) -f $(COQMAKEFILE) $@
rm -f $(COQMAKEFILE)
html: $(COQMAKEFILE) $(VS)
rm -fr html
@$(MAKE) -f $(COQMAKEFILE) $@
cp $(EXTRA_DIR)/resources/* html
$(COQMAKEFILE): $(COQ_PROJ) $(VS)
coq_makefile -f $(COQ_PROJ) $(VS_OTHER) -o $@
%: $(COQMAKEFILE) force
@$(MAKE) -f $(COQMAKEFILE) $@
force $(COQ_PROJ) $(VS): ;
.PHONY: clean all force