diff options
Diffstat (limited to 'configure.ml')
-rw-r--r-- | configure.ml | 31 |
1 files changed, 14 insertions, 17 deletions
diff --git a/configure.ml b/configure.ml index 9d959b9af..194f47c49 100644 --- a/configure.ml +++ b/configure.ml @@ -18,7 +18,7 @@ let vo_magic = 8891 let state_magic = 58891 let distributed_exec = ["coqtop.opt"; "coqidetop.opt"; "coqqueryworker.opt"; "coqproofworker.opt"; "coqtacticworker.opt"; - "coqc";"coqchk";"coqdoc";"coqworkmgr";"coq_makefile";"coq-tex";"gallina";"coqwc";"csdpcert";"coqdep"] + "coqc";"coqchk";"coqdoc";"coqworkmgr";"coq_makefile";"coq-tex";"coqwc";"csdpcert";"coqdep"] let verbose = ref false (* for debugging this script *) @@ -235,12 +235,6 @@ let get_date () = let short_date, full_date = get_date () - -(** Create the bin/ directory if non-existent *) - -let _ = if not (dir_exists "bin") then Unix.mkdir "bin" 0o755 - - (** * Command-line parsing *) type ide = Opt | Byte | No @@ -256,7 +250,6 @@ type preferences = { datadir : string option; mandir : string option; docdir : string option; - emacslib : string option; coqdocdir : string option; ocamlfindcmd : string option; lablgtkdir : string option; @@ -294,7 +287,6 @@ let default = { datadir = None; mandir = None; docdir = None; - emacslib = None; coqdocdir = None; ocamlfindcmd = None; lablgtkdir = None; @@ -392,8 +384,6 @@ let args_options = Arg.align [ "<dir> Where to install man files"; "-docdir", arg_string_option (fun p docdir -> { p with docdir }), "<dir> Where to install doc files"; - "-emacslib", arg_string_option (fun p emacslib -> { p with emacslib }), - "<dir> Where to install emacs files"; "-coqdocdir", arg_string_option (fun p coqdocdir -> { p with coqdocdir }), "<dir> Where to install Coqdoc style files"; "-ocamlfind", arg_string_option (fun p ocamlfindcmd -> { p with ocamlfindcmd }), @@ -461,14 +451,19 @@ let _ = parse_args () type camlexec = { mutable find : string; mutable top : string; - mutable lex : string; } + mutable lex : string; + mutable yacc : string; + } let camlexec = { find = "ocamlfind"; top = "ocaml"; - lex = "ocamllex"; } + lex = "ocamllex"; + yacc = "ocamlyacc"; + } let reset_caml_lex c o = c.lex <- o +let reset_caml_yacc c o = c.yacc <- o let reset_caml_top c o = c.top <- o let reset_caml_find c o = c.find <- o @@ -580,6 +575,9 @@ let camlbin, caml_version, camllib, findlib_version = if is_executable (camlbin / "ocamllex") then reset_caml_lex camlexec (camlbin / "ocamllex") in let () = + if is_executable (camlbin / "ocamlyacc") + then reset_caml_yacc camlexec (camlbin / "ocamlyacc") in + let () = if is_executable (camlbin / "ocaml") then reset_caml_top camlexec (camlbin / "ocaml") in camlbin, caml_version, camllib, findlib_version @@ -601,14 +599,14 @@ let caml_version_nums = "Is it installed properly?") let check_caml_version () = - if caml_version_nums >= [4;2;1] then + if caml_version_nums >= [4;2;3] then cprintf "You have OCaml %s. Good!" caml_version else let () = cprintf "Your version of OCaml is %s." caml_version in if !prefs.force_caml_version then warn "Your version of OCaml is outdated." else - die "You need OCaml 4.02.1 or later." + die "You need OCaml 4.02.3 or later." let _ = check_caml_version () @@ -1006,8 +1004,6 @@ let install = [ Relative "man", Relative "share/man", Relative "man"; "DOCDIR", "the Coq documentation", !prefs.docdir, Relative "doc", Relative "share/doc/coq", Relative "doc"; - "EMACSLIB", "the Coq Emacs mode", !prefs.emacslib, - Relative "emacs", Relative "share/emacs/site-lisp", Relative "tools"; "COQDOCDIR", "the Coqdoc LaTeX files", !prefs.coqdocdir, Relative "latex", Relative "share/texmf/tex/latex/misc", Relative "tools/coqdoc"; ] @@ -1280,6 +1276,7 @@ let write_makefile f = pr "OCAML=%S\n" camlexec.top; pr "OCAMLFIND=%S\n" camlexec.find; pr "OCAMLLEX=%S\n" camlexec.lex; + pr "OCAMLYACC=%S\n" camlexec.yacc; pr "# The best compiler: native (=opt) or bytecode (=byte)\n"; pr "BEST=%s\n\n" best_compiler; pr "# Ocaml version number\n"; |