1bdep-default-options-files(1)General Commands Manuabldep-default-options-files(1)
2
3
4

NAME

6       bdep-default-options-files - specifying default options
7

SYNOPSIS

9       bdep command [mode-options] ...
10

DESCRIPTION

12       Instead of having a separate config file format for tool configuration,
13       the build2 toolchain uses default options files which contain the  same
14       options  as  what can be specified on the command line. The default op‐
15       tions files are like options files that one can specify with --options-
16       file (bdep-common-options(1)) except that they are loaded by default.
17
18       The  default  options  files  are  searched  for  in  the  .build2/ and
19       .build2/local/ subdirectories of each outer  directory  beginning  from
20       the start directory and until reaching either the home directory or the
21       filesystem root directory (both excluding). Then in the .build2/ subdi‐
22       rectory  of the home directory and finally in the system directory (for
23       example, /etc/build2/) if configured.
24
25       Once the search is complete, the files are loaded in the reverse order,
26       that  is, beginning from the system directory (if any), followed by the
27       home directory, ending with the start directory, and finishing off with
28       the  options  specified on the command line.  In other words, the files
29       are loaded from the more generic to the more specific with the  command
30       line options having the ability to override any values specified in the
31       default options files.
32
33       The start directory, the names of the default  options  files,  and  in
34       which order they are loaded within each directory are determined by the
35       command and potentially its mode-options. See  each  command's  DEFAULT
36       OPTIONS FILES section for details.
37
38       If  a  default  options  file  contains  --no-default-options, then the
39       search is stopped at the directory containing this file  and  no  outer
40       files are loaded. If this option is specified on the command line, then
41       none of the default options files are searched for or loaded.
42
43       An additional directory containing default options files can be  speci‐
44       fied  with  --default-options. If such a directory is a subdirectory of
45       the start directory or is between the start directory and  the  end  of
46       the outer search, then its configuration files are loaded at the corre‐
47       sponding point in the directory hierarchy. Otherwise, they  are  loaded
48       after the home directory.
49
50       The  presence  of  the .git filesystem entry causes the default options
51       files in this directory and any of its subdirectories to be  considered
52       remote.  Depending  on the command, some security-sensitive options may
53       be disallowed or trigger a prompt  when  specified  in  remote  options
54       files  (in  the  current implementation this is the case even for files
55       from the .build2/local/ subdirectory since the mere location is  not  a
56       sufficient ground to definitively conclude that the file is not remote;
57       to be sure we would need to query the  version  control  system).  Note
58       that  additional default options files specified with --default-options
59       are never considered remote.
60
61       The order in which default options files are loaded is  traced  at  the
62       verbosity level 3 (-V option) or higher.
63

BUGS

65       Send bug reports to the users@build2.org mailing list.
66
68       Copyright (c) 2014-2021 the build2 authors.
69
70       Permission  is  granted to copy, distribute and/or modify this document
71       under the terms of the MIT License.
72
73
74
75bdep 0.14.0                      October 2021    bdep-default-options-files(1)
Impressum