aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/coqdoc/cdglobals.ml
diff options
context:
space:
mode:
authorGravatar Hugo Herbelin <Hugo.Herbelin@inria.fr>2016-11-12 03:08:34 +0100
committerGravatar Hugo Herbelin <Hugo.Herbelin@inria.fr>2017-05-29 12:12:56 +0200
commit58935ddbaf6f0e2470716d30f70ea18a9f8151c4 (patch)
treed1d3c05980afd415a48431b23051b05918cb902c /tools/coqdoc/cdglobals.ml
parentd53ba17d1761261593c598b6a88cfd6ce0eb3514 (diff)
Exporting the suffixes needed to build coqlib, docdir, etc.
This allows to centralize in the configuration file the description of the 3 possible installation layouts (dispatched over directories shared by multiple application as in unix, self-contained style like in windows, local non-installation as with option -local). Also supporting relocalisation when -prefix or -libdir and co is given.
Diffstat (limited to 'tools/coqdoc/cdglobals.ml')
-rw-r--r--tools/coqdoc/cdglobals.ml7
1 files changed, 1 insertions, 6 deletions
diff --git a/tools/coqdoc/cdglobals.ml b/tools/coqdoc/cdglobals.ml
index 4b5c5d2e5..a1987387f 100644
--- a/tools/coqdoc/cdglobals.ml
+++ b/tools/coqdoc/cdglobals.ml
@@ -79,12 +79,7 @@ let guess_coqlib () =
else
let coqbin = normalize_path (Filename.dirname Sys.executable_name) in
let prefix = Filename.dirname coqbin in
- let rpath =
- if Coq_config.local then []
- else if Coq_config.arch_is_win32 then ["lib"]
- else ["lib/coq"]
- in
- let coqlib = List.fold_left (/) prefix rpath in
+ let coqlib = prefix / Coq_config.coqlibsuffix in
if Sys.file_exists (coqlib / file) then coqlib
else prefix