diff options
author | Thomas Refis <refis.thomas@gmail.com> | 2018-10-10 16:16:00 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-10 16:16:00 +0100 |
commit | d68e0e207765350eb42fed37444d643669f98cee (patch) | |
tree | 5b5b289543b450cdbadacc15518876c60f87f86e /parsing/dune | |
parent | 8e801959e84e73219190dedad0b5b62b1f4f50a3 (diff) | |
download | ocaml-d68e0e207765350eb42fed37444d643669f98cee.tar.gz |
Provide a way to build the bytecode compiler using Dune (#2093)
Diffstat (limited to 'parsing/dune')
-rw-r--r-- | parsing/dune | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/parsing/dune b/parsing/dune new file mode 100644 index 0000000000..4198c6b1ba --- /dev/null +++ b/parsing/dune @@ -0,0 +1,48 @@ +;************************************************************************** +;* * +;* OCaml * +;* * +;* Thomas Refis, Jane Street Europe * +;* * +;* Copyright 2018 Jane Street Group LLC * +;* * +;* All rights reserved. This file is distributed under the terms of * +;* the GNU Lesser General Public License version 2.1, with the * +;* special exception on linking described in the file LICENSE. * +;* * +;************************************************************************** + +;; We're just reusing the stuff from boot/ here. +;; One could add a dune file in boot/menhir/ with the appropriate rules if we +;; want to regenerate the parser while building with dune, but it doesn't seem +;; essential right now. + +(rule + (targets camlinternalMenhirLib.ml) + (mode fallback) + (action (copy# ../boot/menhir/menhirLib.ml %{targets}))) + +(rule + (targets camlinternalMenhirLib.mli) + (mode fallback) + (action (copy# ../boot/menhir/menhirLib.mli %{targets}))) + +(rule + (targets parser.ml) + (mode fallback) + (deps (:dep ../boot/menhir/parser.ml)) + (action + (with-stdout-to %{targets} + (bash "cat %{dep} | sed 's/MenhirLib/CamlinternalMenhirLib/g'")))) + +(rule + (targets parser.mli) + (mode fallback) + (deps (:dep ../boot/menhir/parser.mli)) + (action + (with-stdout-to %{targets} + (bash "cat %{dep} | sed 's/MenhirLib/CamlinternalMenhirLib/g'")))) + +(ocamllex + (modules lexer) + (mode fallback)) |