From 1d0eb5d4d6fea88abc29798ee2004b2e27e952c6 Mon Sep 17 00:00:00 2001 From: Emilio Jesus Gallego Arias Date: Wed, 8 Mar 2017 03:22:22 +0100 Subject: [camlpX] Remove camlp4 compat layer. We remove the camlp4 compatibility layer, and try to clean up most structures. `parsing/compat` is gone. We added some documentation to the lexer/parser interfaces that are often obscured by module includes. --- configure.ml | 20 +++----------------- 1 file changed, 3 insertions(+), 17 deletions(-) (limited to 'configure.ml') diff --git a/configure.ml b/configure.ml index dfc6724a2..cc63fde70 100644 --- a/configure.ml +++ b/configure.ml @@ -310,10 +310,8 @@ let args_options = Arg.align [ " Specifies the ocamlfind command to use"; "-lablgtkdir", arg_string_option Prefs.lablgtkdir, " Specifies the path to the Lablgtk library"; - "-usecamlp5", Arg.Set Prefs.usecamlp5, - " Specifies to use camlp5 instead of camlp4"; - "-usecamlp4", Arg.Clear Prefs.usecamlp5, - " Specifies to use camlp4 instead of camlp5"; + "-usecamlp5", Arg.Unit (fun () -> ()), + " Deprecated"; "-camlp5dir", Arg.String (fun s -> Prefs.usecamlp5:=true; Prefs.camlp5dir:=Some s), " Specifies where is the Camlp5 library and tells to use it"; @@ -561,7 +559,6 @@ let check_camlp5 testcma = match !Prefs.camlp5dir with dir, camlp5o with Not_found -> let () = printf "No Camlp5 installation found." in - let () = printf "Looking for Camlp4 instead...\n" in raise NoCamlp5 let check_camlp5_version camlp5o = @@ -580,18 +577,7 @@ let config_camlpX () = let camlp5_version = check_camlp5_version camlp5o in "camlp5", camlp5o, Filename.dirname camlp5o, camlp5libdir, camlp5mod, camlp5_version with NoCamlp5 -> - (* We now try to use Camlp4, either by explicit choice or - by lack of proper Camlp5 installation *) - let camlp4mod = "camlp4lib" in - let camlp4libdir = camllib/"camlp4" in - if not (Sys.file_exists (camlp4libdir/camlp4mod^".cma")) then - die "No Camlp4 installation found.\n"; - try - let camlp4orf = which_camlpX "camlp4orf" in - let version_line, _ = run ~err:StdOut camlp4orf ["-v"] in - let camlp4_version = List.nth (string_split ' ' version_line) 2 in - "camlp4", camlp4orf, Filename.dirname camlp4orf, camlp4libdir, camlp4mod, camlp4_version - with _ -> die "No Camlp4 installation found.\n" + die "No Camlp5 installation found.\n" let camlpX, camlpXo, camlpXbindir, fullcamlpXlibdir, camlpXmod, camlpX_version = config_camlpX () -- cgit v1.2.3