2018-01-27 06:03:27 -08:00
|
|
|
(**************************************************************************)
|
|
|
|
(* *)
|
|
|
|
(* OCaml *)
|
|
|
|
(* *)
|
|
|
|
(* Sebastien Hinderer, projet Gallium, INRIA Paris *)
|
|
|
|
(* *)
|
|
|
|
(* Copyright 2018 Institut National de Recherche en Informatique et *)
|
|
|
|
(* en Automatique. *)
|
|
|
|
(* *)
|
|
|
|
(* All rights reserved. This file is distributed under the terms of *)
|
|
|
|
(* the GNU Lesser General Public License version 2.1, with the *)
|
|
|
|
(* special exception on linking described in the file LICENSE. *)
|
|
|
|
(* *)
|
|
|
|
(**************************************************************************)
|
|
|
|
|
2018-01-27 07:10:27 -08:00
|
|
|
(* Locations of files in the OCaml source tree *)
|
2018-01-27 06:03:27 -08:00
|
|
|
|
|
|
|
open Ocamltest_stdlib
|
|
|
|
|
|
|
|
type runtime_variant =
|
|
|
|
| Normal
|
|
|
|
| Debug
|
|
|
|
| Instrumented
|
|
|
|
|
|
|
|
let runtime_variant() =
|
2018-02-21 00:26:36 -08:00
|
|
|
let use_runtime = Sys.safe_getenv "USE_RUNTIME" in
|
2018-01-27 06:03:27 -08:00
|
|
|
if use_runtime="d" then Debug
|
|
|
|
else if use_runtime="i" then Instrumented
|
|
|
|
else Normal
|
|
|
|
|
2020-05-20 22:16:03 -07:00
|
|
|
let ocamlrun =
|
2018-01-27 06:03:27 -08:00
|
|
|
let runtime = match runtime_variant () with
|
|
|
|
| Normal -> "ocamlrun"
|
|
|
|
| Debug -> "ocamlrund"
|
|
|
|
| Instrumented -> "ocamlruni" in
|
|
|
|
let ocamlrunfile = Filename.mkexe runtime in
|
2020-05-20 22:16:03 -07:00
|
|
|
Filename.make_path [Ocaml_directories.srcdir; "runtime"; ocamlrunfile]
|
2018-01-27 06:03:27 -08:00
|
|
|
|
2020-05-20 22:16:03 -07:00
|
|
|
let ocamlc =
|
2020-06-17 00:29:56 -07:00
|
|
|
Filename.make_path [Ocaml_directories.srcdir; Filename.mkexe "ocamlc"]
|
2018-01-27 06:03:27 -08:00
|
|
|
|
2020-05-20 22:16:03 -07:00
|
|
|
let ocaml =
|
2020-06-17 00:29:56 -07:00
|
|
|
Filename.make_path [Ocaml_directories.srcdir; Filename.mkexe "ocaml"]
|
2018-01-27 06:03:27 -08:00
|
|
|
|
2020-05-20 22:16:03 -07:00
|
|
|
let ocamlc_dot_opt =
|
2020-06-17 00:29:56 -07:00
|
|
|
Filename.make_path [Ocaml_directories.srcdir; Filename.mkexe "ocamlc.opt"]
|
2018-01-27 06:03:27 -08:00
|
|
|
|
2020-05-20 22:16:03 -07:00
|
|
|
let ocamlopt =
|
2020-06-17 00:29:56 -07:00
|
|
|
Filename.make_path [Ocaml_directories.srcdir; Filename.mkexe "ocamlopt"]
|
2018-01-27 06:03:27 -08:00
|
|
|
|
2020-05-20 22:16:03 -07:00
|
|
|
let ocamlopt_dot_opt =
|
2020-06-17 00:29:56 -07:00
|
|
|
Filename.make_path [Ocaml_directories.srcdir; Filename.mkexe "ocamlopt.opt"]
|
2018-01-27 06:03:27 -08:00
|
|
|
|
2020-05-20 22:16:03 -07:00
|
|
|
let ocamlnat =
|
|
|
|
Filename.make_path [Ocaml_directories.srcdir; Filename.mkexe "ocamlnat"]
|
2018-01-27 06:03:27 -08:00
|
|
|
|
2020-05-20 22:16:03 -07:00
|
|
|
let cmpbyt =
|
2020-06-17 00:29:56 -07:00
|
|
|
Filename.make_path
|
|
|
|
[Ocaml_directories.srcdir; "tools"; Filename.mkexe "cmpbyt"]
|
2018-01-27 06:03:27 -08:00
|
|
|
|
2020-05-20 22:16:03 -07:00
|
|
|
let expect_test =
|
2018-01-27 06:03:27 -08:00
|
|
|
Filename.make_path
|
2020-05-20 22:16:03 -07:00
|
|
|
[Ocaml_directories.srcdir; "testsuite"; "tools";
|
|
|
|
Filename.mkexe "expect_test"]
|
2018-03-01 01:10:16 -08:00
|
|
|
|
2020-05-20 22:16:03 -07:00
|
|
|
let ocamllex =
|
2020-06-17 00:29:56 -07:00
|
|
|
Filename.make_path
|
|
|
|
[Ocaml_directories.srcdir; "lex"; Filename.mkexe "ocamllex"]
|
2018-03-01 01:10:16 -08:00
|
|
|
|
2020-05-20 22:16:03 -07:00
|
|
|
let ocamlyacc =
|
|
|
|
Filename.make_path
|
|
|
|
[Ocaml_directories.srcdir; "yacc"; Filename.mkexe "ocamlyacc"]
|
2018-03-05 02:09:57 -08:00
|
|
|
|
2020-05-20 22:16:03 -07:00
|
|
|
let ocamldoc =
|
2020-06-17 00:29:56 -07:00
|
|
|
Filename.make_path
|
|
|
|
[Ocaml_directories.srcdir; "ocamldoc"; Filename.mkexe "ocamldoc"]
|
2018-03-16 00:25:17 -07:00
|
|
|
|
2020-05-20 22:16:03 -07:00
|
|
|
let ocamldebug =
|
|
|
|
Filename.make_path
|
|
|
|
[Ocaml_directories.srcdir; "debugger"; Filename.mkexe "ocamldebug"]
|
2018-04-05 06:49:18 -07:00
|
|
|
|
2020-05-20 22:16:03 -07:00
|
|
|
let ocamlobjinfo =
|
2020-06-17 00:29:56 -07:00
|
|
|
Filename.make_path
|
|
|
|
[Ocaml_directories.srcdir; "tools"; Filename.mkexe "ocamlobjinfo"]
|
2018-04-09 08:03:02 -07:00
|
|
|
|
2020-05-20 22:16:03 -07:00
|
|
|
let ocamlmklib =
|
2020-06-17 00:29:56 -07:00
|
|
|
Filename.make_path
|
|
|
|
[Ocaml_directories.srcdir; "tools"; Filename.mkexe "ocamlmklib"]
|
2018-04-27 02:09:48 -07:00
|
|
|
|
2020-05-20 22:16:03 -07:00
|
|
|
let codegen =
|
2020-06-17 00:29:56 -07:00
|
|
|
Filename.make_path
|
|
|
|
[Ocaml_directories.srcdir; "testsuite"; "tools"; Filename.mkexe "codegen"]
|
2018-04-27 02:09:48 -07:00
|
|
|
|
2020-05-20 22:16:03 -07:00
|
|
|
let asmgen_archmod =
|
2018-04-27 02:09:48 -07:00
|
|
|
let objname =
|
|
|
|
"asmgen_" ^ Ocamltest_config.arch ^ "." ^ Ocamltest_config.objext
|
|
|
|
in
|
2020-05-20 22:16:03 -07:00
|
|
|
Filename.make_path [Ocaml_directories.srcdir; "testsuite"; "tools"; objname]
|