aboutsummaryrefslogtreecommitdiff
path: root/mathcomp/Makefile.common
diff options
context:
space:
mode:
authorCyril Cohen2019-11-27 12:48:23 +0100
committerGitHub2019-11-27 12:48:23 +0100
commit8b78152ce646d0f2f91b7c90f204dd98ef6a1d4b (patch)
treebea0175f39517d9fd750b0dbef8bfc1a365e3bb8 /mathcomp/Makefile.common
parentf43a928dc62abd870c3b15b4147b2ad76029b701 (diff)
parent6be8dddd806c3515467526ea0e964ca4fee188ad (diff)
Merge pull request #428 from maximedenes/build-doc
Add Makefile target to build the doc
Diffstat (limited to 'mathcomp/Makefile.common')
-rw-r--r--mathcomp/Makefile.common24
1 files changed, 22 insertions, 2 deletions
diff --git a/mathcomp/Makefile.common b/mathcomp/Makefile.common
index 8e84ccc..04c3adc 100644
--- a/mathcomp/Makefile.common
+++ b/mathcomp/Makefile.common
@@ -25,7 +25,7 @@ TGTS?=
######################################################################
# local context: -----------------------------------------------------
-.PHONY: all config build only test-suite clean distclean __always__
+.PHONY: all config build only test-suite clean distclean doc doc-clean __always__
.SUFFIXES:
H:= $(if $(VERBOSE),,@) # not used yet
@@ -72,7 +72,7 @@ only: sub-only this-only
test-suite: sub-test-suite this-test-suite
-clean: sub-clean this-clean
+clean: sub-clean this-clean doc-clean
distclean: sub-distclean this-distclean
@@ -127,3 +127,23 @@ endif
# Make of individual .vo ---------------------------------------------
%.vo: __always__ Makefile.coq
+$(COQMAKE) $@
+
+doc: __always__ Makefile.coq
+ mkdir -p _build_doc/
+ cp -r $(COQFILES) -t _build_doc/ --parents
+ cp Make Makefile* _build_doc
+ mkdir -p _build_doc/htmldoc
+ . ../etc/utils/builddoc_lib.sh; \
+ cd _build_doc && mangle_sources $(COQFILES)
+ +cd _build_doc && $(COQMAKE)
+ cd _build_doc && if [ ! -f .Makefile.coq.d ] ; then cp .coqdeps.d .Makefile.coq.d ; fi #can be removed when coq-8.10 compatibility is dropped
+ cd _build_doc && grep -v vio: .Makefile.coq.d > depend
+ cd _build_doc && cat depend | ../../etc/buildlibgraph $(COQFILES) > htmldoc/depend.js
+ cd _build_doc && $(COQBIN)coqdoc -t "Mathematical Components" \
+ -g --utf8 -R . mathcomp \
+ --parse-comments \
+ --multi-index $(COQFILES) -d htmldoc
+ cp ../etc/artwork/coqdoc.css _build_doc/htmldoc
+
+doc-clean:
+ rm -r _build_doc/