aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib
diff options
context:
space:
mode:
authorGravatar Jim Fehrle <jfehrle@sbcglobal.net>2018-01-22 12:45:49 -0800
committerGravatar Jim Fehrle <jfehrle@sbcglobal.net>2018-02-17 12:03:51 -0800
commitb60906cc3ee3f994babf9cceff2971bd03485f2f (patch)
treead8c5e662329d6db09f04736fc64dedcf1a6563a /lib
parent47e43e229ab02a4dedc2405fed3960a4bf476b58 (diff)
Change references to CAMLP4 to CAMLP5 to be more accurate since we no
longer use camlp4.
Diffstat (limited to 'lib')
-rw-r--r--lib/envars.ml29
-rw-r--r--lib/envars.mli11
2 files changed, 17 insertions, 23 deletions
diff --git a/lib/envars.ml b/lib/envars.ml
index 8ebf84057..9b66c1f71 100644
--- a/lib/envars.ml
+++ b/lib/envars.ml
@@ -155,23 +155,21 @@ let exe s = s ^ Coq_config.exec_extension
let ocamlfind () = Coq_config.ocamlfind
-(** {2 Camlp4 paths} *)
+(** {2 Camlp5 paths} *)
-let guess_camlp4bin () = which (user_path ()) (exe Coq_config.camlp4)
+let guess_camlp5bin () = which (user_path ()) (exe "camlp5")
-let camlp4bin () =
- if !Flags.boot then Coq_config.camlp4bin else
- try guess_camlp4bin ()
+let camlp5bin () =
+ if !Flags.boot then Coq_config.camlp5bin else
+ try guess_camlp5bin ()
with Not_found ->
- Coq_config.camlp4bin
+ Coq_config.camlp5bin
-let camlp4 () = camlp4bin () / exe Coq_config.camlp4
-
-let camlp4lib () =
+let camlp5lib () =
if !Flags.boot then
- Coq_config.camlp4lib
+ Coq_config.camlp5lib
else
- let ex, res = CUnix.run_command (ocamlfind () ^ " query " ^ Coq_config.camlp4) in
+ let ex, res = CUnix.run_command (ocamlfind () ^ " query camlp5") in
match ex with
| Unix.WEXITED 0 -> String.strip res
| _ -> "/dev/null"
@@ -206,11 +204,10 @@ let print_config ?(prefix_var_name="") f coq_src_subdirs =
fprintf f "%sCOQLIB=%s/\n" prefix_var_name (coqlib ());
fprintf f "%sDOCDIR=%s/\n" prefix_var_name (docdir ());
fprintf f "%sOCAMLFIND=%s\n" prefix_var_name (ocamlfind ());
- fprintf f "%sCAMLP4=%s\n" prefix_var_name Coq_config.camlp4;
- fprintf f "%sCAMLP4O=%s\n" prefix_var_name Coq_config.camlp4o;
- fprintf f "%sCAMLP4BIN=%s/\n" prefix_var_name (camlp4bin ());
- fprintf f "%sCAMLP4LIB=%s\n" prefix_var_name (camlp4lib ());
- fprintf f "%sCAMLP4OPTIONS=%s\n" prefix_var_name Coq_config.camlp4compat;
+ fprintf f "%sCAMLP5O=%s\n" prefix_var_name Coq_config.camlp5o;
+ fprintf f "%sCAMLP5BIN=%s/\n" prefix_var_name (camlp5bin ());
+ fprintf f "%sCAMLP5LIB=%s\n" prefix_var_name (camlp5lib ());
+ fprintf f "%sCAMLP5OPTIONS=%s\n" prefix_var_name Coq_config.camlp5compat;
fprintf f "%sCAMLFLAGS=%s\n" prefix_var_name Coq_config.caml_flags;
fprintf f "%sHASNATDYNLINK=%s\n" prefix_var_name
(if Coq_config.has_natdynlink then "true" else "false");
diff --git a/lib/envars.mli b/lib/envars.mli
index 09f2b4ca1..1ccd1feff 100644
--- a/lib/envars.mli
+++ b/lib/envars.mli
@@ -56,14 +56,11 @@ val coqpath : string list
(** [camlfind ()] is the path to the ocamlfind binary. *)
val ocamlfind : unit -> string
-(** [camlp4bin ()] is the path to the camlp4 binary. *)
-val camlp4bin : unit -> string
+(** [camlp5bin ()] is the path to the camlp5 binary. *)
+val camlp5bin : unit -> string
-(** [camlp4lib ()] is the path to the camlp4 library. *)
-val camlp4lib : unit -> string
-
-(** [camlp4 ()] is the camlp4 utility. *)
-val camlp4 : unit -> string
+(** [camlp5lib ()] is the path to the camlp5 library. *)
+val camlp5lib : unit -> string
(** Coq tries to honor the XDG Base Directory Specification to access
the user's configuration files.