#!/usr/bin/env bash # Copyright (c) 2015-present, Facebook, Inc. All rights reserved. # reopt is a decorator for ocamlopt that passes arguments through to ocamlopt directly # If it detects the invocation is to build myocamlbuild, it modifies the commandline arguments # by adding reasonbuild.cmx setglobal DIR = $[ cd $[ dirname $(BASH_SOURCE[0])] && pwd] if [[ -f $DIR/share.sh ]] { source "$DIR/share.sh" } if [[ -f $DIR/share ]] { source "$DIR/share" } if test -z $OCAMLOPT { setglobal OCAMLOPT = '"ocamlopt.opt'" } # use OCAMLOPT that's passed in by rebuild $OCAMLOPT @Argv