From e1cc944a9320159621e11055fd7a9210a6f4eef9 Mon Sep 17 00:00:00 2001 From: Rudi Grinberg Date: Sat, 2 Jun 2018 18:30:06 +0700 Subject: [PATCH] Add an entry for custom build directories to the manual Signed-off-by: Rudi Grinberg --- doc/usage.rst | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/doc/usage.rst b/doc/usage.rst index 49dd92d6..f62605a6 100644 --- a/doc/usage.rst +++ b/doc/usage.rst @@ -533,3 +533,20 @@ you need to specify the name explicitly via the ``-n`` flag: Finally, note that jbuilder doesn't allow you to customize the list of substituted watermarks. If you which to do so, you need to configure topkg and use it instead of ``jbuilder subst``. + +Custom Build Directory +====================== + +By default dune places all build artifacts in the ``_build`` directory relative +to the user's workspace. However, one can customize this directory by using the +``--build-dir`` flag or the ``DUNE_BUILD_DIR`` environment variable. + +.. code:: bash + + $ dune build --build-dir _build-foo + + # this is equivalent to: + $ DUNE_BUILD_DIR=_build-foo dune build + + # Absolute paths are also allowed + $ dune build --build-dir /tmp/build foo.exe