Skip to content

Commit

Permalink
ocamlmktop: add a new initialization module
Browse files Browse the repository at this point in the history
  • Loading branch information
Octachron committed Jul 4, 2022
1 parent 0efd547 commit 3038f31
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 2 deletions.
7 changes: 7 additions & 0 deletions tools/Makefile
Expand Up @@ -144,6 +144,13 @@ OCAMLMKTOP=config.cmo build_path_prefix_map.cmo misc.cmo \

ocamlmktop$(EXE): $(OCAMLMKTOP)
ocamlmktop.opt$(EXE): $(call byte2native, $(OCAMLMKTOP))
all: ocamlmktop_init.cmo
INSTALL_LIBDIR_OCAMLMKTOP = $(INSTALL_LIBDIR)/ocamlmktop
install::
$(MKDIR) "$(INSTALL_LIBDIR_OCAMLMKTOP)"
$(INSTALL_DATA) \
ocamlmktop_init.cmi ocamlmktop_init.cmo \
"$(INSTALL_LIBDIR_OCAMLMKTOP)"

# Converter olabl/ocaml 2.99 to ocaml 3

Expand Down
6 changes: 4 additions & 2 deletions tools/ocamlmktop.ml
Expand Up @@ -24,8 +24,10 @@ let _ =
let extra_quote = if Sys.win32 then "\"" else "" in
let ocamlc = Filename.(quote (concat (dirname ocamlmktop) ocamlc)) in
let cmdline =
extra_quote ^ ocamlc ^ " -I +compiler-libs -linkall ocamlcommon.cma " ^
"ocamlbytecomp.cma ocamltoplevel.cma " ^ args ^ " topstart.cmo" ^
extra_quote ^ ocamlc ^
" -I +compiler-libs -I +ocamlmktop " ^
"-linkall ocamlcommon.cma ocamlbytecomp.cma ocamltoplevel.cma " ^
"ocamlmktop_init.cmo " ^ args ^ " topstart.cmo" ^
extra_quote
in
exit(Sys.command cmdline)
17 changes: 17 additions & 0 deletions tools/ocamlmktop_init.ml
@@ -0,0 +1,17 @@
(**************************************************************************)
(* *)
(* OCaml *)
(* *)
(* Florian Angeletti, projet Cambium, Inria Paris *)
(* *)
(* Copyright 2022 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. *)
(* *)
(**************************************************************************)

let () =
Topcommon.load_topdirs_signature ()

0 comments on commit 3038f31

Please sign in to comment.