Generated files which are promote-until-clean have now their basenames

suffixed with _generated.
This commit is contained in:
Christian Rinderknecht 2019-04-24 14:34:15 +02:00
parent cae817309c
commit b361f71845
3 changed files with 11 additions and 8 deletions

View File

@ -1 +1,2 @@
ast.ml
ast_generated.ml
parser_generated.mly

View File

@ -0,0 +1 @@
include Ast_generated

View File

@ -5,7 +5,7 @@
tezos-utils
lex
)
(modules ast parser user)
(modules ast ast_generated parser user)
(flags (:standard -w +1..62-4-9-44-40-42-48@39@33 -open Tezos_utils ))
(preprocess
(pps tezos-utils.ppx_let_generalized)
@ -16,14 +16,15 @@
(rule
(targets parser.ml parser.mli)
(deps parser.mly ast.ml)
(action (system "menhir --explain --external-tokens Lex.Token lex/token.mly parser.mly --base parser"))
(deps parser_generated.mly ast.ml)
(action (system "menhir --explain --external-tokens Lex.Token lex/token.mly parser_generated.mly --base parser"))
)
(rule
(targets parser.mly)
(targets parser_generated.mly)
(deps partial_parser.mly pre_parser.mly)
(action (system "cat pre_parser.mly partial_parser.mly > parser.mly"))
(action (system "cat pre_parser.mly partial_parser.mly > parser_generated.mly"))
(mode promote-until-clean)
)
(rule
@ -35,9 +36,9 @@
;; Generating AST
(rule
(targets ast.ml)
(targets ast_generated.ml)
(deps generator.exe)
(action (system "./generator.exe ast > ast.ml"))
(action (system "./generator.exe ast > ast_generated.ml"))
(mode promote-until-clean)
)