aboutsummaryrefslogtreecommitdiff
path: root/bdep/projects-configs.cxx
blob: 9ae4c3e68205cb86ee8b1563fa788280b288895c (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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
// -*- C++ -*-
//
// This file was generated by CLI, a command line interface
// compiler for C++.
//

// Begin prologue.
//
#include <bdep/types-parsers.hxx>
//
// End prologue.

#include <bdep/projects-configs.hxx>

#include <map>

namespace bdep
{
  ::bdep::cli::usage_para
  print_bdep_projects_configs_usage (::std::ostream& os, ::bdep::cli::usage_para p)
  {
    CLI_POTENTIALLY_UNUSED (os);

    if (p != ::bdep::cli::usage_para::none)
      os << ::std::endl;

    os << "\033[1mSYNOPSIS\033[0m" << ::std::endl
       << ::std::endl
       << "\033[1mbdep\033[0m \033[4mcommand\033[0m [\033[4mpkg-spec\033[0m] [\033[4mcfg-spec\033[0m] ...\033[0m" << ::std::endl
       << ::std::endl
       << "\033[4mcfg-spec\033[0m = (\033[1m@\033[0m\033[4mcfg-name\033[0m | \033[1m--config\033[0m|\033[1m-c\033[0m \033[4mcfg-dir\033[0m)... | \033[1m--all\033[0m|\033[1m-a\033[0m" << ::std::endl
       << "\033[4mpkg-spec\033[0m = (\033[1m--directory\033[0m|\033[1m-d\033[0m \033[4mpkg-dir\033[0m)... | \033[4mprj-spec\033[0m" << ::std::endl
       << "\033[4mprj-spec\033[0m = \033[1m--directory\033[0m|\033[1m-d\033[0m \033[4mprj-dir\033[0m\033[0m" << ::std::endl
       << ::std::endl
       << "\033[1mDESCRIPTION\033[0m" << ::std::endl
       << ::std::endl
       << "Most \033[1mbdep\033[0m commands operate on a project or some of its packages as well as its" << ::std::endl
       << "build configurations. For example, \033[1mstatus\033[0m (\033[1mbdep-status(1)\033[0m) shows the status of" << ::std::endl
       << "one or more project packages in one or more build configurations. While \033[1mfetch\033[0m" << ::std::endl
       << "(\033[1mbdep-fetch(1)\033[0m) fetches the list of available to the project dependency" << ::std::endl
       << "packages, again, in one or more build configurations." << ::std::endl
       << ::std::endl
       << "Without any \033[1m--directory\033[0m|\033[1m-d\033[0m\033[0m options specified, the current working directory is" << ::std::endl
       << "assumed to be either the project root directory, the package root directory, or" << ::std::endl
       << "one of the package subdirectories. This is the common \033[1mbdep\033[0m usage mode where you" << ::std::endl
       << "run it from within your project's source code directories, similar to version" << ::std::endl
       << "control tools such as \033[1mgit(1)\033[0m." << ::std::endl
       << ::std::endl
       << "Alternatively, the project or (several) package directories can be specified" << ::std::endl
       << "with the \033[1m--directory\033[0m|\033[1m-d\033[0m\033[0m options. Note that \033[1mbdep\033[0m operates on a single project" << ::std::endl
       << "but potentially multiple packages belonging to said project at a time." << ::std::endl
       << ::std::endl
       << "Some \033[1mbdep\033[0m commands, such as \033[1mfetch\033[0m, operate on the whole project. If such a" << ::std::endl
       << "command is given a package directory (either as the working directory or with" << ::std::endl
       << "\033[1m--directory\033[0m|\033[1m-d\033[0m\033[0m), then it automatically determines its project directory and" << ::std::endl
       << "uses that." << ::std::endl
       << ::std::endl
       << "Other commands, such as \033[1mstatus\033[0m, operate on one or more packages. If such a" << ::std::endl
       << "command is given a project directory, then it automatically determines the list" << ::std::endl
       << "of packages belonging to this project and uses that. Note that what exactly" << ::std::endl
       << "\033[4mbelonging\033[0m means is command-specific. For most commands it means all the" << ::std::endl
       << "packages initialized in a given build configuration. For \033[1minit\033[0m (\033[1mbdep-init(1)\033[0m)," << ::std::endl
       << "however, it means all the packages available in the project (for example, as" << ::std::endl
       << "listed in \033[1mpackages.manifest\033[0m)." << ::std::endl
       << ::std::endl
       << "A project managed by \033[1mbdep\033[0m has one or more associated build configurations (see" << ::std::endl
       << "\033[1mbdep-config(1)\033[0m for details). Some of these configurations, one per the" << ::std::endl
       << "configuration type, can be designated as default and used if no configuration" << ::std::endl
       << "is specified explicitly. So, for example, running \033[1mstatus\033[0m without any arguments" << ::std::endl
       << "in the project directory will show the status of all the project packages" << ::std::endl
       << "initialized in the default configurations." << ::std::endl
       << ::std::endl
       << "An associated build configuration can be assigned a name in which case we can" << ::std::endl
       << "specify it using the \033[1m@\033[0m\033[4mcfg-name\033[0m\033[0m notation. For example:" << ::std::endl
       << ::std::endl
       << "$ bdep status @gcc @clang" << ::std::endl
       << ::std::endl
       << "Note to Windows users: a command line argument with leading \033[1m@\033[0m has a special" << ::std::endl
       << "meaning in PowerShell. To work around this, you can use the alternative \033[1m-@gcc\033[0m" << ::std::endl
       << "syntax or the \033[1m-n gcc\033[0m option." << ::std::endl
       << ::std::endl
       << "A configuration without a name can be specified as a directory using the" << ::std::endl
       << "\033[1m--config\033[0m|\033[1m-c\033[0m\033[0m option. Name and directory specifications can be mixed. For" << ::std::endl
       << "example:" << ::std::endl
       << ::std::endl
       << "$ bdep status @gcc -c ../builds/clang" << ::std::endl
       << ::std::endl
       << "Finally, we can use the \033[1m--all\033[0m|\033[1m-a\033[0m\033[0m option to specify all the build configurations" << ::std::endl
       << "associated with the project." << ::std::endl;

    p = ::bdep::cli::usage_para::text;

    return p;
  }
}

// Begin epilogue.
//
//
// End epilogue.