aboutsummaryrefslogtreecommitdiff
path: root/libbutl/default-options.mxx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2019-08-21 18:55:27 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2019-08-22 10:37:06 +0300
commit20615c2161fb491e4c87b0cc8483c2e600ae6f79 (patch)
tree56eab64fc3499e8c28d32de59feb08efe9cd4da0 /libbutl/default-options.mxx
parent375c7c9770c5407af33058170d13d9801a508b30 (diff)
Add extra_dir parameter for load_default_options()
Diffstat (limited to 'libbutl/default-options.mxx')
-rw-r--r--libbutl/default-options.mxx11
1 files changed, 8 insertions, 3 deletions
diff --git a/libbutl/default-options.mxx b/libbutl/default-options.mxx
index 403df47..0f4b194 100644
--- a/libbutl/default-options.mxx
+++ b/libbutl/default-options.mxx
@@ -79,11 +79,13 @@ LIBBUTL_MODEXPORT namespace butl
//
// - sys_dir
// - home_dir
+ // - extra_dir (can also be handled during the start/outer traversal)
// - start_dir and outer until home_dir or root (both excluding)
//
- // Except for sys_dir, the options files are looked for in the .build2/ and
- // .build2/local/ subdirectories of each directory. For sys_dir they are
- // looked for in the directory itself (e.g., /etc/build2/).
+ // Except for sys_dir and extra_dir, the options files are looked for in the
+ // .build2/ and .build2/local/ subdirectories of each directory. For
+ // sys_dir and extra_dir they are looked for in the directory itself (e.g.,
+ // /etc/build2/).
//
// Note that the search is stopped at the directory containing a file with
// --no-default-options.
@@ -97,10 +99,13 @@ LIBBUTL_MODEXPORT namespace butl
// sufficient ground to definitively conclude that the file is not remote;
// to be sure we would need to query the VCS or some such).
//
+ // Note that the extra directory options files are never considered remote.
+ //
template <typename O, typename S, typename U, typename F>
default_options<O>
load_default_options (const optional<dir_path>& sys_dir,
const optional<dir_path>& home_dir,
+ const optional<dir_path>& extra_dir,
const default_options_files&,
F&&);