aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar notin <notin@85f007b7-540e-0410-9357-904b9bb8a0f7>2006-05-02 10:07:25 +0000
committerGravatar notin <notin@85f007b7-540e-0410-9357-904b9bb8a0f7>2006-05-02 10:07:25 +0000
commit8de001fbc2dd1a5fcec2bfd9d5fb5f022d4b77be (patch)
tree23564c80be8e3e9e5770278ad516e9572b84ded5
parent140aa7e12c0735b7c3e793436378bf015b5c6dec (diff)
Ajout d'une option --coqlib_path pour Coqdoc (modification suggérée par S. Mimram)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@8775 85f007b7-540e-0410-9357-904b9bb8a0f7
-rw-r--r--doc/Makefile1
-rw-r--r--man/coqdoc.14
-rw-r--r--tools/coqdoc/cdglobals.ml1
-rw-r--r--tools/coqdoc/main.ml5
4 files changed, 11 insertions, 0 deletions
diff --git a/doc/Makefile b/doc/Makefile
index 07b130394..7ded383f9 100644
--- a/doc/Makefile
+++ b/doc/Makefile
@@ -232,6 +232,7 @@ stdlib/html/index.html: stdlib/index-list.html stdlib/index-body.html stdlib/ind
stdlib/Library.coqdoc.tex:
(for dir in $(LIBDIRS) ; do \
$(COQDOC) -q --gallina --body-only --latex --stdout \
+ --coqlib_path $(COQTOP) \
-R $(COQTOP)/theories Coq "$(COQTOP)/theories/$$dir/"*.v >> $@ ; done)
stdlib/Library.dvi: $(COMMON) stdlib/Library.coqdoc.tex stdlib/Library.tex
diff --git a/man/coqdoc.1 b/man/coqdoc.1
index 1d294c742..c443e8b04 100644
--- a/man/coqdoc.1
+++ b/man/coqdoc.1
@@ -125,6 +125,10 @@ Do not insert links to the Coq standard library.
Set base URL for the Coq standard library (default is http://coq.inria.fr/library/).
.TP
+.BI \-\-coqlib_path \ dir
+Set the base path where the Coq files are installed, especially style files coqdoc.sty and coqdoc.css.
+
+.TP
.BI -R \ dir \ coqdir
Map physical directory dir to Coq logical directory coqdir (similarly
to Coq option -R).
diff --git a/tools/coqdoc/cdglobals.ml b/tools/coqdoc/cdglobals.ml
index b5a4cb22c..80f7feef2 100644
--- a/tools/coqdoc/cdglobals.ml
+++ b/tools/coqdoc/cdglobals.ml
@@ -44,6 +44,7 @@ let page_title = ref ""
let title = ref ""
let externals = ref true
let coqlib = ref "http://coq.inria.fr/library/"
+let coqlib_path = ref Coq_config.coqlib
let raw_comments = ref false
let charset = ref "iso-8859-1"
diff --git a/tools/coqdoc/main.ml b/tools/coqdoc/main.ml
index 6c2757bd8..892104340 100644
--- a/tools/coqdoc/main.ml
+++ b/tools/coqdoc/main.ml
@@ -54,6 +54,7 @@ let usage () =
prerr_endline " --no-externals no links to Coq standard library";
prerr_endline " --coqlib <url> set URL for Coq standard library";
prerr_endline " (default is http://coq.inria.fr/library/)";
+ prerr_endline " --coqlib_path <dir> set the path where Coq files are installed";
prerr_endline " -R <dir> <coqdir> map physical dir to Coq dir";
prerr_endline " --latin1 set ISO-8859-1 input language";
prerr_endline " --utf8 set UTF-8 input language";
@@ -317,6 +318,10 @@ let parse () =
Cdglobals.coqlib := u; parse_rec rem
| ("--coqlib" | "-coqlib") :: [] ->
usage ()
+ | ("--coqlib_path" | "-coqlib_path") :: d :: rem ->
+ Cdglobals.coqlib_path := d; parse_rec rem
+ | ("--coqlib_path" | "-coqlib_path") :: [] ->
+ usage ()
| f :: rem ->
add_file (what_file f); parse_rec rem
in