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