From d19e55bd4debf396b134485074d233ba1864c3af Mon Sep 17 00:00:00 2001 From: Rudi Grinberg Date: Mon, 2 Jul 2018 12:52:48 +0700 Subject: [PATCH 1/2] Rename %{build_profile} to %{profile} Signed-off-by: Rudi Grinberg --- src/super_context.ml | 2 +- test/blackbox-tests/test-cases/workspaces/custom-profile/dune | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/super_context.ml b/src/super_context.ml index 181de7b5..f769a995 100644 --- a/src/super_context.ml +++ b/src/super_context.ml @@ -309,7 +309,7 @@ let create ; "ext_lib" , string context.ext_lib ; "ext_dll" , string context.ext_dll ; "ext_exe" , string context.ext_exe - ; "build_profile" , string context.profile + ; "profile" , string context.profile ] in let vars = diff --git a/test/blackbox-tests/test-cases/workspaces/custom-profile/dune b/test/blackbox-tests/test-cases/workspaces/custom-profile/dune index 1517a8a5..72b034ed 100644 --- a/test/blackbox-tests/test-cases/workspaces/custom-profile/dune +++ b/test/blackbox-tests/test-cases/workspaces/custom-profile/dune @@ -1,3 +1,3 @@ (alias (name runtest) - (action (echo "build profile: %{build_profile}"))) \ No newline at end of file + (action (echo "build profile: %{profile}"))) \ No newline at end of file From 5f6e0f658fd4dca3ab16e3515f79d009289b925a Mon Sep 17 00:00:00 2001 From: Rudi Grinberg Date: Mon, 2 Jul 2018 12:54:39 +0700 Subject: [PATCH 2/2] Update doc/changes regarding %{profile} Signed-off-by: Rudi Grinberg --- CHANGES.md | 2 ++ doc/jbuild.rst | 1 + 2 files changed, 3 insertions(+) diff --git a/CHANGES.md b/CHANGES.md index 21df2d87..ca7f1e35 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -95,6 +95,8 @@ next - Version `dune-workspace` and `~/.config/dune/config` files (#..., @diml) +- Add `%{profile}` variable. (#938, @rgrinberg) + 1.0+beta20 (10/04/2018) ----------------------- diff --git a/doc/jbuild.rst b/doc/jbuild.rst index 892ea76c..93db54a1 100644 --- a/doc/jbuild.rst +++ b/doc/jbuild.rst @@ -820,6 +820,7 @@ Jbuilder supports the following variables: not be exactly the same as what you can see in the output of ``ocamlc -config``. In particular, variables added in new versions of OCaml needs to be registered in Jbuilder before they can be used +- ``profile`` the profile selected via ``--profile`` In addition, ``(action ...)`` fields support the following special variables: