this repo has no description
at main 77 lines 1.8 kB view raw
1; Generate eval.ml from eval.cppo.ml with conditional OXCAML flag 2 3(rule 4 (targets eval.ml) 5 (deps (:x eval.cppo.ml)) 6 (enabled_if (not %{ocaml-config:ox})) 7 (action (run %{bin:cppo} -V OCAML:%{ocaml_version} %{x} -o %{targets}))) 8 9(rule 10 (targets eval.ml) 11 (deps (:x eval.cppo.ml)) 12 (enabled_if %{ocaml-config:ox}) 13 (action (run %{bin:cppo} -V OCAML:%{ocaml_version} -D OXCAML %{x} -o %{targets}))) 14 15; Generate ocamlfmt.ml from ocamlfmt.cppo.ml with conditional OXCAML flag 16 17(rule 18 (targets ocamlfmt.ml) 19 (deps (:x ocamlfmt.cppo.ml)) 20 (enabled_if (not %{ocaml-config:ox})) 21 (action (run %{bin:cppo} -V OCAML:%{ocaml_version} %{x} -o %{targets}))) 22 23(rule 24 (targets ocamlfmt.ml) 25 (deps (:x ocamlfmt.cppo.ml)) 26 (enabled_if %{ocaml-config:ox}) 27 (action (run %{bin:cppo} -V OCAML:%{ocaml_version} -D OXCAML %{x} -o %{targets}))) 28 29; On OxCaml, ocamlformat-lib conflicts with js_of_ocaml-compiler (inconsistent 30; Ocaml_common), so we exclude it. ocamlfmt.ml becomes a no-op stub on OxCaml. 31(library 32 (name x_worker) 33 (enabled_if (not %{ocaml-config:ox})) 34 (ocamlopt_flags (:standard -w -58)) 35 (libraries 36 brr 37 js_of_ocaml 38 js_of_ocaml-toplevel 39 x-ocaml.protocol 40 x-ocaml.lib 41 merlin-js.worker 42 ocamlformat-lib 43 ocamlformat-lib.parser_extended 44 ocamlformat-lib.format_)) 45 46(library 47 (name x_worker) 48 (enabled_if %{ocaml-config:ox}) 49 (ocamlopt_flags (:standard -w -58)) 50 (libraries 51 brr 52 js_of_ocaml 53 js_of_ocaml-toplevel 54 x-ocaml.protocol 55 x-ocaml.lib 56 merlin-js.worker)) 57 58(rule 59 (targets export.txt) 60 (deps export-stdlib.txt) 61 (action 62 (with-stdout-to 63 %{targets} 64 (progn 65 (cat %{deps}) 66 (echo "Ast_mapper\n") 67 (echo "X_ocaml_lib\n"))))) 68 69(rule 70 (target export-stdlib.txt) 71 (action 72 (run 73 jsoo_listunits 74 -o 75 %{target} 76 stdlib 77 %{dep:../worker-lib/x_ocaml_lib.cma})))