Source

mutated_ocaml / 0scripts / 0BUILD.sh

Full commit
#!/bin/sh

# Build the whole.
#
#   If an argument is specified, use it as PREFIX, then install the system
#   Otherwise, it uses $PREFIX, and does not perform installation.

set -e

if [ "$1" != "" ]; then
    PREFIX=$1
    INSTALL=1
fi

./configure --prefix $PREFIX
make clean core coreboot
./build/mixed-boot.sh
cp boot/myocamlbuild boot/myocamlbuild.boot
make world opt opt.opt

if [ "$INSTALL" = "1" ]; then
  /bin/rm -rf $PREFIX/lib/ocaml
  /bin/rm -rf $PREFIX/bin/ocaml*
  /bin/rm -rf $PREFIX/bin/caml*
  mkdir -p $PREFIX/lib
  mkdir -p $PREFIX/bin
  make install
fi