package / ocaml-base-compiler.4.10.0 / lambda / generate_runtimedef.sh
1 #!/bin/sh
2
3 #**************************************************************************
4 #* *
5 #* OCaml *
6 #* *
7 #* Xavier Leroy, projet Cristal, INRIA Rocquencourt *
8 #* *
9 #* Copyright 1999 Institut National de Recherche en Informatique et *
10 #* en Automatique. *
11 #* *
12 #* All rights reserved. This file is distributed under the terms of *
13 #* the GNU Lesser General Public License version 2.1, with the *
14 #* special exception on linking described in the file LICENSE. *
15 #* *
16 #**************************************************************************
17
18 echo 'let builtin_exceptions = [|'
19 tr -d '\r' < "$1" | sed -n -e 's|.*/\* \("[A-Za-z_]*"\) \*/$| \1;|p'
20 echo '|]'
21
22 echo 'let builtin_primitives = [|'
23 sed -e 's/.*/ "&";/' "$2"
24 echo '|]'
25