diff options
| author | Gaëtan Gilbert | 2019-02-21 14:18:43 +0100 |
|---|---|---|
| committer | Gaëtan Gilbert | 2019-02-21 14:18:43 +0100 |
| commit | 5f7bb95b6532a6983a2d1880aa531e4e4dd6568d (patch) | |
| tree | 668ac7028f2f0490c15054d93c6b0868eaed93ea /tools/coqdoc | |
| parent | 87b4657566d5d4f0ea3d40dae7ba470d957ffe76 (diff) | |
| parent | d6f88819f5279e94d33e0e15f6be1e368210af08 (diff) | |
Merge PR #9588: [azure] [ci] Build on Windows using Dune.
Reviewed-by: SkySkimmer
Diffstat (limited to 'tools/coqdoc')
| -rw-r--r-- | tools/coqdoc/cdglobals.ml | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/coqdoc/cdglobals.ml b/tools/coqdoc/cdglobals.ml index 0d3fb77551..5dd6cc6c83 100644 --- a/tools/coqdoc/cdglobals.ml +++ b/tools/coqdoc/cdglobals.ml @@ -79,14 +79,17 @@ let use_suffix prefix suffix = (** A weaker analog of the function in Envars *) +let getenv_else s dft = try Sys.getenv s with Not_found -> dft () + let guess_coqlib () = + getenv_else "COQLIB" (fun () -> let file = "theories/Init/Prelude.vo" in let coqbin = normalize_path (Filename.dirname Sys.executable_name) in let prefix = Filename.dirname coqbin in let coqlib = use_suffix prefix Coq_config.coqlibsuffix in if Sys.file_exists (coqlib / file) then coqlib else if not Coq_config.local && Sys.file_exists (Coq_config.coqlib / file) - then Coq_config.coqlib else prefix + then Coq_config.coqlib else prefix) let header_trailer = ref true let header_file = ref "" |
