<commit_before>#!/bin/sh

set -e

if ! [ -x vendor/_prefix/bin/menhir ]; then
  echo "Building menhir..."
  (cd vendor/menhir;
   touch manual.pdf; # missing for some reason
   make PREFIX=$(pwd)/../_prefix/ install;
   git clean -dxf >/dev/null 2>&1)
fi

if ! [ -x vendor/merr/merr.native ]; then
  echo "Building merr..."
  (cd vendor/merr;
   export MENHIR=$(pwd)/../_prefix/bin/menhir;
   ocamlbuild -use-ocamlfind merr/merr.native;
   ocamlbuild -use-ocamlfind merr/merr.native)
fi

echo "Building foundry..."

if [ -n "$JS_OF_OCAML" ]; then
  FOUNDRY_JS=foundry_web.js
fi

export OCAMLPATH=/usr/lib/ocaml/llvm-3.4/
ocamlbuild -j 8 -use-ocamlfind \
  unittest/test_foundry.native  \
  src/tools/file_check.native    \
  src/tools/foundry_vm.native    \
  src/tools/foundry_xfrm.native  \
  src/tools/foundry_gen.native   \
  $FOUNDRY_JS<commit_msg>scripts: remove hardcoded OCAMLPATH.<commit_after>#!/bin/sh

set -e

if ! [ -x vendor/_prefix/bin/menhir ]; then
  echo "Building menhir..."
  (cd vendor/menhir;
   touch manual.pdf; # missing for some reason
   make PREFIX=$(pwd)/../_prefix/ install;
   git clean -dxf >/dev/null 2>&1)
fi

if ! [ -x vendor/merr/merr.native ]; then
  echo "Building merr..."
  (cd vendor/merr;
   export MENHIR=$(pwd)/../_prefix/bin/menhir;
   ocamlbuild -use-ocamlfind merr/merr.native;
   ocamlbuild -use-ocamlfind merr/merr.native)
fi

echo "Building foundry..."

if [ -n "$JS_OF_OCAML" ]; then
  FOUNDRY_JS=foundry_web.js
fi

ocamlbuild -j 8 -use-ocamlfind \
  unittest/test_foundry.native  \
  src/tools/file_check.native    \
  src/tools/foundry_vm.native    \
  src/tools/foundry_xfrm.native  \
  src/tools/foundry_gen.native   \
  $FOUNDRY_JS
{'fraction_non_alphanumeric': 0.14700652045050386, 'fraction_numerical': 0.004742145820983995, 'mean_word_length': 3.0, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4392747', 'n_tokens_mistral': 705, 'n_tokens_neox': 682, 'n_words': 132}