From 81802638190ade2b989f34eb7afb92a1413f59c6 Mon Sep 17 00:00:00 2001 From: Maxime Dénès Date: Fri, 15 Nov 2019 19:28:02 +0100 Subject: Add Makefile target to build the doc --- mathcomp/Makefile.common | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) (limited to 'mathcomp') diff --git a/mathcomp/Makefile.common b/mathcomp/Makefile.common index 8e84ccc..2dc4396 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,22 @@ endif # Make of individual .vo --------------------------------------------- %.vo: __always__ Makefile.coq +$(COQMAKE) $@ + +doc: + 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 && 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/ -- cgit v1.2.3