1 ;**************************************************************************
2 ;* *
3 ;* OCaml *
4 ;* *
5 ;* Thomas Refis, Jane Street Europe *
6 ;* *
7 ;* Copyright 2018 Jane Street Group LLC *
8 ;* *
9 ;* All rights reserved. This file is distributed under the terms of *
10 ;* the GNU Lesser General Public License version 2.1, with the *
11 ;* special exception on linking described in the file LICENSE. *
12 ;* *
13 ;**************************************************************************
14
15 ;; We're just reusing the stuff from boot/ here.
16 ;; One could add a dune file in boot/menhir/ with the appropriate rules if we
17 ;; want to regenerate the parser while building with dune, but it doesn't seem
18 ;; essential right now.
19
20 (rule
21 (targets camlinternalMenhirLib.ml)
22 (mode fallback)
23 (action (copy# ../boot/menhir/menhirLib.ml %{targets})))
24
25 (rule
26 (targets camlinternalMenhirLib.mli)
27 (mode fallback)
28 (action (copy# ../boot/menhir/menhirLib.mli %{targets})))
29
30 (rule
31 (targets parser.ml)
32 (mode fallback)
33 (deps (:dep ../boot/menhir/parser.ml))
34 (action
35 (with-stdout-to %{targets}
36 (bash "cat %{dep} | sed 's/MenhirLib/CamlinternalMenhirLib/g'"))))
37
38 (rule
39 (targets parser.mli)
40 (mode fallback)
41 (deps (:dep ../boot/menhir/parser.mli))
42 (action
43 (with-stdout-to %{targets}
44 (bash "cat %{dep} | sed 's/MenhirLib/CamlinternalMenhirLib/g'"))))
45
46 (ocamllex
47 (modules lexer)
48 (mode fallback))
49