#!/usr/bin/env bash # Copyright (c) 2015-present, Facebook, Inc. All rights reserved. # rec is a decorator for ocamlc that passes arguments through to ocamlc 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 $OCAMLC { setglobal OCAMLC = '"ocamlc.opt'" } # use OCAMLC that's passed in by rebuild $OCAMLC @Argv