diff --git a/ocamlbuild/exit_codes.ml b/ocamlbuild/exit_codes.ml new file mode 100644 index 000000000..19cb4f02f --- /dev/null +++ b/ocamlbuild/exit_codes.ml @@ -0,0 +1,15 @@ +let rc_ok = 0 +let rc_usage = 1 +let rc_failure = 2 +let rc_invalid_argument = 3 +let rc_system_error = 4 +let rc_hygiene = 1 +let rc_circularity = 5 +let rc_solver_failed = 6 +let rc_ocamldep_error = 7 +let rc_lexing_error = 8 +let rc_build_error = 9 +let rc_executor_subcommand_failed = 10 +let rc_executor_subcommand_got_signal = 11 +let rc_executor_io_error = 12 +let rc_executor_excetptional_condition = 13 diff --git a/ocamlbuild/exit_codes.mli b/ocamlbuild/exit_codes.mli new file mode 100644 index 000000000..acbc0ede3 --- /dev/null +++ b/ocamlbuild/exit_codes.mli @@ -0,0 +1,15 @@ +val rc_ok : int +val rc_usage : int +val rc_failure : int +val rc_invalid_argument : int +val rc_system_error : int +val rc_hygiene : int +val rc_circularity : int +val rc_solver_failed : int +val rc_ocamldep_error : int +val rc_lexing_error : int +val rc_build_error : int +val rc_executor_subcommand_failed : int +val rc_executor_subcommand_got_signal : int +val rc_executor_io_error : int +val rc_executor_excetptional_condition : int diff --git a/ocamlbuild/main.ml b/ocamlbuild/main.ml index 8646bdca2..8b1dcdfca 100644 --- a/ocamlbuild/main.ml +++ b/ocamlbuild/main.ml @@ -209,25 +209,6 @@ let proceed () = (sbprintf "@[<2>Circular dependencies: %S already seen in@ %a@]@." p pp_l seen)) ;; -module Exit_codes = - struct - let rc_ok = 0 - let rc_usage = 1 - let rc_failure = 2 - let rc_invalid_argument = 3 - let rc_system_error = 4 - let rc_hygiene = 1 - let rc_circularity = 5 - let rc_solver_failed = 6 - let rc_ocamldep_error = 7 - let rc_lexing_error = 8 - let rc_build_error = 9 - let rc_executor_reserved_1 = 10 (* Redefined in Executor *) - let rc_executor_reserved_2 = 11 - let rc_executor_reserved_3 = 12 - let rc_executor_reserved_4 = 13 - end - open Exit_codes;; let main () = diff --git a/ocamlbuild/ocamlbuild_pack.mlpack b/ocamlbuild/ocamlbuild_pack.mlpack index 200eae9b6..805eefe5e 100644 --- a/ocamlbuild/ocamlbuild_pack.mlpack +++ b/ocamlbuild/ocamlbuild_pack.mlpack @@ -35,3 +35,4 @@ Ocaml_utils Ocaml_tools Ocaml_compiler Ocaml_dependencies +Exit_codes