~ubuntu-branches/ubuntu/wily/coq-doc/wily

« back to all changes in this revision

Viewing changes to tools/coqdoc/cdglobals.ml

  • Committer: Package Import Robot
  • Author(s): Stéphane Glondu
  • Date: 2012-01-03 23:42:48 UTC
  • mfrom: (1.2.4)
  • Revision ID: package-import@ubuntu.com-20120103234248-p9r8h1579n67v55a
Tags: 8.3pl3-1
New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
(************************************************************************)
2
2
(*  v      *   The Coq Proof Assistant  /  The Coq Development Team     *)
3
 
(* <O___,, *   INRIA - CNRS - LIX - LRI - PPS - Copyright 1999-2010     *)
 
3
(* <O___,, *   INRIA - CNRS - LIX - LRI - PPS - Copyright 1999-2011     *)
4
4
(*   \VV/  **************************************************************)
5
5
(*    //   *      This file is distributed under the terms of the       *)
6
6
(*         *       GNU Lesser General Public License Version 2.1        *)
49
49
 
50
50
let glob_source = ref DotGlob
51
51
 
 
52
(** A weaker analog of the function in Envars *)
 
53
 
 
54
let guess_coqlib () =
 
55
  let file = "states/initial.coq" in
 
56
  if Sys.file_exists (Filename.concat Coq_config.coqlib file)
 
57
  then Coq_config.coqlib
 
58
  else
 
59
    let coqbin = Filename.dirname Sys.executable_name in
 
60
    let prefix = Filename.dirname coqbin in
 
61
    let rpath = if Coq_config.local then [] else
 
62
        (if Coq_config.arch = "win32" then ["lib"] else ["lib";"coq"]) in
 
63
    let coqlib = List.fold_left Filename.concat prefix rpath in
 
64
    if Sys.file_exists (Filename.concat coqlib file) then coqlib
 
65
    else
 
66
      Coq_config.coqlib
 
67
 
52
68
let header_trailer = ref true
53
69
let header_file = ref ""
54
70
let header_file_spec = ref false
66
82
let title = ref ""
67
83
let externals = ref true
68
84
let coqlib = ref Coq_config.wwwstdlib
69
 
let coqlib_path = ref Coq_config.coqlib
 
85
let coqlib_path = ref (guess_coqlib ())
70
86
let raw_comments = ref false
71
87
let parse_comments = ref false
72
88
let plain_comments = ref false