Merge pull request #958 from rgrinberg/dune-gen-meta

Rename JBUILDER_GEN to DUNE_GEN
This commit is contained in:
Rudi Grinberg 2018-07-06 15:52:08 +07:00 committed by GitHub
commit 19e332d8a4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 2 deletions

View File

@ -179,3 +179,9 @@ Removed Variables
-----------------
``${path-no-dep:file}`` has been removed.
``# JBUILDER_GEN`` renamed
--------------------------
``# DUNE_GEN`` should be used instead of ``# JBUILDER_GEN`` in META templates.

View File

@ -102,7 +102,7 @@ module Gen(P : Install_params) = struct
let template =
Build.if_file_exists meta_template
~then_:(Build.lines_of meta_template)
~else_:(Build.return ["# JBUILDER_GEN"])
~else_:(Build.return ["# DUNE_GEN"])
in
let meta_contents =
version >>^ fun version ->
@ -123,7 +123,8 @@ module Gen(P : Install_params) = struct
String.extract_blank_separated_words
(String.sub s ~pos:1 ~len:(String.length s - 1))
with
| ["JBUILDER_GEN"] -> Format.fprintf ppf "%a@," Meta.pp meta.entries
| ["JBUILDER_GEN" | "DUNE_GEN"] ->
Format.fprintf ppf "%a@," Meta.pp meta.entries
| _ -> Format.fprintf ppf "%s@," s
else
Format.fprintf ppf "%s@," s);