blob: 571c6145aad21c1e0d5a57d38d0f88e25bb830e6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
|
// file : bpkg/cfg-create.cli
// copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
include <bpkg/common.cli>;
"\section=1"
"\name=bpkg-cfg-create"
"\summary=create configuration"
namespace bpkg
{
{
"<options>
<cfg-args> <cfg-var> <module>",
"\h|SYNOPSIS|
\c{\b{bpkg cfg-create}|\b{create} [<options>] [<cfg-args>]\n
\b{bpkg cfg-create}|\b{create} [<options>] \b{--existing|-e}}
\c{<cfg-args> = (<module> | <cfg-var>)...}
\h|DESCRIPTION|
The \cb{cfg-create} command creates a new \cb{bpkg} configuration with
the specified \cb{build2} modules and configuration variables (the first
form) or initializes one based on an existing build system configuration
(the second form). The \cb{bpkg} configuration itself is a build system
configuration; see build system driver (\l{b(1)}) \cb{create}
meta-operation for details.
Unless the \cb{--existing|-e} or \cb{--wipe} option is specified,
\cb{cfg-create} expects the configuration directory to be empty or to not
exist (in which case it will be created).
By default, the configuration created with the first form loads the
\cb{config}, \cb{test}, \cb{dist}, and \cb{install} modules. However,
additional modules and, if required, their configuration variables can be
specified as the \cb{cfg-create} arguments. For example:
\
bpkg create cxx config.cxx=clang++ config.install.root=/usr/local
\
By default, \cb{bpkg} appends \cb{.config} to the names of the modules
that you specify so that only their configurations are loaded. You can
override this behavior by specifying the period (\cb{.}) after the module
name. You can also instruct \cb{bpkg} to use the optional module load by
prefixing the module name with the question mark (\cb{?}). For example:
\
bpkg create cxx. \"?cli\"
\
"
}
class cfg_create_options: common_options
{
"\h|CFG-CREATE OPTIONS|"
dir_path --directory|-d (".")
{
"<dir>",
"Create the configuration in <dir> rather than in the current working
directory."
}
bool --existing|-e
{
"Initialize a \cb{bpkg} configuration based on an existing build system
configuration."
}
bool --wipe
{
"Wipe the configuration directory clean before creating the new
configuration. For safety, this option requires that you specify the
configuration directory explicitly with \cb{--directory|-d}."
}
};
}
|