Commit c6fd0fa6 authored by POTTIER Francois's avatar POTTIER Francois
Browse files

Improve [make doc]; add [make view].

parent 8e2a0742
......@@ -28,6 +28,8 @@ all:
test:
@ dune build @runtest
# ------------------------------------------------------------------------------
# [make versions] compiles Fix under many versions of OCaml, whose
# list is specified below.
......@@ -86,15 +88,39 @@ pin:
unpin:
@ opam pin remove $(THIS)
# ------------------------------------------------------------------------------
# Documentation.
DOCDIR = _build/default/_doc/_html
DOC = $(DOCDIR)/index.html
CSS = $(DOCDIR)/odoc.css
.PHONY: doc
doc:
dune build @doc
@echo You can find the documentation in _build/default/_doc/_html/index.html
@ rm -rf _build/default/_doc
@ dune clean
@ dune build @doc
@ sed -i.bak 's/font-weight: 500;/font-weight: bold;/' $(CSS) && rm -f $(CSS).bak
@ echo "You can view the documentation by typing 'make view'".
.PHONY: view
view: doc
@ echo Attempting to open $(DOC)...
@ if command -v firefox > /dev/null ; then \
firefox $(DOC) ; \
else \
open -a /Applications/Firefox.app/ $(DOC) ; \
fi
.PHONY: export
export: doc
ssh yquem.inria.fr rm -rf public_html/$(THIS)/doc
scp -r _build/default/_doc/_html yquem.inria.fr:public_html/$(THIS)/doc
scp -r $(DOCDIR) yquem.inria.fr:public_html/$(THIS)/doc
# ------------------------------------------------------------------------------
# Headers.
HEADACHE := headache
LIBHEAD := $(shell pwd)/headers/library-header
......@@ -105,6 +131,8 @@ headache:
@ $(FIND) src -regex ".*\.ml\(i\|y\|l\)?" \
-exec $(HEADACHE) -h $(LIBHEAD) "{}" ";"
# ------------------------------------------------------------------------------
.PHONY: release
release:
# Make sure the current version can be compiled and installed.
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment