From 1f9c94403429df14fb839327de7608075c34e90f Mon Sep 17 00:00:00 2001 From: Allan Blanchard <allan.blanchard@cea.fr> Date: Mon, 12 Jun 2023 10:40:12 +0200 Subject: [PATCH] [opam] opam doc install --- opam | 14 ++++++++++---- share/Makefile.documentation | 10 +++++++++- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/opam b/opam index 74395ea3e80..c489a0de056 100644 --- a/opam +++ b/opam @@ -90,13 +90,18 @@ tags: [ build: [ ["bash" "dev/disable-plugins.sh" "e-acsl"] { os-family = "windows" } - ["dune" "build" "-j%{jobs}%" "--release" "--promote-install-files=false" "@install"] - [make "-C" "doc" "download"] {with-doc} + ["dune" "build" "-j%{jobs}%" "--release" "--promote-install-files=false" + "@install" + "@doc" { with-doc } + ] ] install: [ - [make "PREFIX=%{prefix}%" "MANDIR=%{mandir}%" "install"] - [make "PREFIX=%{prefix}%" "-C" "doc" "install"] {with-doc} + [make + "PREFIX=%{prefix}%" "MANDIR=%{man}%" + "DOCDIR=%{doc}%" { with-doc } + "install" + ] ] remove: [ @@ -122,6 +127,7 @@ depends: [ "ocaml" { >= "4.11.1" } "ocamlfind" # needed beyond build stage, used by -load-module "ocamlgraph" { >= "1.8.8" } + "odoc" { with-doc } "why3" { >= "1.6.0" } "yaml" { >= "3.0.0" } "yojson" {>= "1.6.0" & (>= "2.0.1" | !with-test)} diff --git a/share/Makefile.documentation b/share/Makefile.documentation index 47b6802b367..817de5190cb 100644 --- a/share/Makefile.documentation +++ b/share/Makefile.documentation @@ -33,6 +33,14 @@ doc: @echo "Generated Documentation:" @echo " file:///$(PWD)/_build/default/_doc/_html/index.html" +ifneq (${DOCDIR},) + +install:: doc + @mkdir -p ${DOCDIR}/frama-c + @cp -r _build/default/_doc/_html/* ${DOCDIR}/frama-c + +endif + ########################################################################## # # # Generate Documentation for Server Requests and Protocols. # @@ -41,7 +49,7 @@ doc: .PHONY: server-doc-md server-doc-html server-doc -ifeq (NO_BUILD_FRAMAC,yes) +ifeq (${NO_BUILD_FRAMAC},yes) # Make sure that Frama-C is not rebuilt essentially for CI purpose server-doc-md: else -- GitLab