-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
executable file
·46 lines (37 loc) · 1.29 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
# ===================================================================
# Copyright 2024 Zhengpu Shi
# This file is part of VQCS. It is distributed under the MIT
# "expat license". You should have recieved a LICENSE file with it.
# ===================================================================
COQMAKEFILE ?= Makefile.coq
MY_HTML_ROOT = doc/VQCS
MY_HTML_ROOT_WITH_VERSION = $(MY_HTML_ROOT)/v1.0
HTML_EXTRA_DIR = html-extra
COQDOCFLAGS ?= \
--toc --toc-depth 2 --html --interpolate \
--index indexpage \
--no-lib-name \
--with-header $(HTML_EXTRA_DIR)/header.html \
--with-footer $(HTML_EXTRA_DIR)/footer.html \
# --parse-comments
export COQDOCFLAGS
all: $(COQMAKEFILE)
$(MAKE) -f $^ $@
$(COQMAKEFILE): _CoqProject
$(COQBIN)coq_makefile -f $^ -o $@
html: $(COQMAKEFILE)
rm -rf html/
rm -rf $(MY_HTML_ROOT_WITH_VERSION)
mkdir -p $(MY_HTML_ROOT)
$(MAKE) -f $^ $@
mv html $(MY_HTML_ROOT_WITH_VERSION)
cp $(HTML_EXTRA_DIR)/index.html $(MY_HTML_ROOT)/
cp $(HTML_EXTRA_DIR)/header.html $(MY_HTML_ROOT_WITH_VERSION)/
cp $(HTML_EXTRA_DIR)/footer.html $(MY_HTML_ROOT_WITH_VERSION)/
cp $(HTML_EXTRA_DIR)/resources $(MY_HTML_ROOT_WITH_VERSION)/ -R
clean: $(COQMAKEFILE)
$(MAKE) -f $^ cleanall
cleanall: $(COQMAKEFILE)
$(MAKE) -f $^ cleanall
$(RM) $^ $^.conf
.PHONY: all clean cleanall html