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

BUGS

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