Skip to content

Commit

Permalink
fix for js_of_ocaml 2.4
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewray committed Aug 14, 2014
1 parent 7206cae commit 1dc093a
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 3 deletions.
16 changes: 15 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,10 @@ SYNTAX_LIB=$(foreach s,$(SYNTAX),`ocamlfind query -predicates syntax,toploop,pre
SYNTAX_INC=$(foreach s,$(SYNTAX),`ocamlfind query -i-format $(s)`)
endif

# enable threads
ifneq ($(THREAD),)
LINK_THREAD=-thread
endif

KEEP_COMPILER=\
Arg Array ArrayLabels Buffer Callback CamlinternalLazy CamlinternalMod CamlinternalOO \
Expand Down Expand Up @@ -137,6 +141,16 @@ min:
core:
make all EXT=".core" OPT=1 PACKAGES="core_kernel" PRIMJS="core_runtime.js" MODULES="Core_kernel"

spoc:
make all \
OPT=1 \
THREAD=1 EXT=".spoc" \
CAMLP4=1 LWT=1 JSOO=1 \
SYNTAX="js_of_ocaml.syntax lwt.syntax.options lwt.syntax sarek_syntax spoc_external_kernels" \
PACKAGES="bigarray spoc_external_kernels spoc sarek sarek_syntax" \
MODULES="Spoc Kirc Bigarray" \
PRIMJS="$(shell ocamlfind query spoc)/spoc_lib.js"

#######################################################################
# build

Expand Down Expand Up @@ -164,7 +178,7 @@ iocaml_main.cmo: iocaml_main.ml iocaml.cmi
ocamlfind ocamlc -c iocaml_main.ml

iocaml_full.byte: exec.cmo iocaml.cmo iocaml_main.cmo
ocamlfind ocamlc -linkall -linkpkg -o $@ \
ocamlfind ocamlc $(LINK_THREAD) -linkall -linkpkg -o $@ \
$(STD_PACKAGES) \
$(USER_PACKAGES) \
$(COMPILER_LIBS_INC) $(COMPILER_LIBS) \
Expand Down
2 changes: 1 addition & 1 deletion iocaml.ml
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ let execute execution_count str =
v##compilerStatus <- bool true;
v

let load_from_server path =
let load_from_server (_,path) =
try
let xml = XmlHttpRequest.create () in
let () = xml##_open(Js.string "GET", Js.string ("file/" ^ path), Js._false) in
Expand Down
2 changes: 1 addition & 1 deletion iocaml.mli
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ val display : ?base64:bool -> string -> string -> unit
val send_clear : ?wait:bool -> ?stdout:bool -> ?stderr:bool -> ?other:bool -> unit -> unit

(* load a (binary) file from the server *)
val load_from_server : string -> string option
val load_from_server : (string*string) -> string option

val output_cell_max_height : string ref

Expand Down

0 comments on commit 1dc093a

Please sign in to comment.