Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/with_prelude/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Now all targets aside from OCaml related ones are ready to be built.

The information in this section is (at this time) Linux and macOS specific.

The commands in `setup.sh` assume an activated [opam](https://opam.ocaml.org/) installation. Their effect is to create symlinks in the 'third-party/opam' directory. These symlinks support building the example OCaml targets. If any of the symlinks are found to already exist, they will not be overwritten.
The commands in `ocaml-setup.sh` assume an activated [opam](https://opam.ocaml.org/) installation. Their effect is to create a symlink in the 'third-party/opam' directory. This symlink supports building the example OCaml targets. If the symlink is found to already exist, it will not be overwritten.

## Sample commands

Expand Down
15 changes: 0 additions & 15 deletions examples/with_prelude/ocaml-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,21 +27,6 @@ if [ -z "$OPAM_SWITCH_PREFIX" ]; then
fi
set -u

# Check for ocamlopt.opt.
if ! command -v ocamlopt.opt &> /dev/null
then
echo "Failed to run 'ocamlopt.opt'."
exit 1
fi

# Link 'third-party/ocaml/standard_library'.
if [ ! -L third-party/ocaml/standard_library ]; then
(cd third-party/ocaml && ln -s "$(ocamlopt.opt -config | grep standard_library: | awk '{ print $2 }' )" standard_library)
else
echo "Link 'third-party/ocaml/standard_library' exists. To overwrite it, first remove it and run $0 again"
exit 2
fi

# Link 'third-party/ocaml/opam'.
if [ ! -L third-party/ocaml/opam ]; then
(cd third-party/ocaml && ln -s "$OPAM_SWITCH_PREFIX" opam)
Expand Down
8 changes: 4 additions & 4 deletions examples/with_prelude/third-party/ocaml/BUCK
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# buildifier: disable=no-effect
prebuilt_cxx_library(
name = "ocaml-dev",
header_dirs = ["standard_library"],
header_dirs = ["opam/lib/ocaml"],
header_only = True,
visibility = ["PUBLIC"],
) if not host_info().os.is_windows else None
Expand All @@ -27,9 +27,9 @@ prebuilt_ocaml_library(
# buildifier: disable=no-effect
prebuilt_ocaml_library(
name = "ocaml.compiler-libs.common",
bytecode_lib = "standard_library/compiler-libs/ocamlcommon.cma",
include_dir = "standard_library/compiler-libs",
native_lib = "standard_library/compiler-libs/ocamlcommon.cmxa",
bytecode_lib = "opam/lib/ocaml/compiler-libs/ocamlcommon.cma",
include_dir = "opam/lib/ocaml/compiler-libs",
native_lib = "opam/lib/ocaml/compiler-libs/ocamlcommon.cmxa",
visibility = ["PUBLIC"],
deps = [],
) if not host_info().os.is_windows else None
Expand Down