From a8bd8ffa445fa0454146977467518243b1bb6125 Mon Sep 17 00:00:00 2001 From: Rudi Grinberg Date: Fri, 6 Jul 2018 15:10:13 +0700 Subject: [PATCH] Rename JBUILDER_GEN to DUNE_GEN Technically, we still support JBUILDER_GEN Signed-off-by: Rudi Grinberg --- doc/migration.rst | 6 ++++++ src/install_rules.ml | 5 +++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/doc/migration.rst b/doc/migration.rst index 06ad462b..cf968429 100644 --- a/doc/migration.rst +++ b/doc/migration.rst @@ -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. diff --git a/src/install_rules.ml b/src/install_rules.ml index efe4afbf..1df2d525 100644 --- a/src/install_rules.ml +++ b/src/install_rules.ml @@ -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);