ocaml/build/mkruntimedef.sh

22 lines
1.0 KiB
Bash
Executable File

#!/bin/sh
#########################################################################
# #
# OCaml #
# #
# Nicolas Pouillard, projet Gallium, INRIA Rocquencourt #
# #
# Copyright 2007 Institut National de Recherche en Informatique et #
# en Automatique. All rights reserved. This file is distributed #
# under the terms of the Q Public License version 1.0. #
# #
#########################################################################
echo 'let builtin_exceptions = [|'; \
sed -n -e 's|.*/\* \("[A-Za-z_]*"\) \*/$| \1;|p' byterun/fail.h | \
sed -e '$s/;$//'; \
echo '|]'; \
echo 'let builtin_primitives = [|'; \
sed -e 's/.*/ "&";/' -e '$s/;$//' byterun/primitives; \
echo '|]'