// file      : bdep/update.cli
// license   : MIT; see accompanying LICENSE file

include <bdep/project.cli>;

"\section=1"
"\name=bdep-update"
"\summary=update project in build configurations"

namespace bdep
{
  {
    "<options>
     <prj-spec> <prj-dir>
     <pkg-spec> <pkg-dir>
     <cfg-spec> <cfg-name> <cfg-dir>
     <cfg-var>",

    "\h|SYNOPSIS|

     \c{\b{bdep update} [<options>] [<pkg-spec>] [<cfg-spec>] [<cfg-var>...]}

     \c{<cfg-spec> = (\b{@}<cfg-name> | \b{--config}|\b{-c} <cfg-dir>)... | \b{--all}|\b{-a}\n
        <pkg-spec> = (\b{--directory}|\b{-d} <pkg-dir>)... | <prj-spec>\n
        <prj-spec> = \b{--directory}|\b{-d} <prj-dir>}

     \h|DESCRIPTION|

     The \cb{update} command updates the project packages in one or more build
     configurations. Additionally, immediate or all dependencies of the
     project packages can be updated by specifying the
     \c{\b{--immediate}|\b{-i}} or \c{\b{--recursive}|\b{-r}} options,
     respectively.

     Underneath \cb{update} executes the \l{bpkg-pkg-update(1)} command
     which itself is not much more than the build system \cb{update} operation
     (see \l{b(1)} for details). As a result, the main utility of this command
     is the ability to refer to build configurations by names and to project
     packages implicitly via the current working directory as well as to
     update dependencies.

     If no project or package directory is specified, then the current working
     directory is assumed. If no configuration is specified, then the default
     configurations are assumed. See \l{bdep-projects-configs(1)} for details
     on specifying projects and configurations. Optional \c{\i{cfg-var}...}
     are the additional configuration variables to pass to the build system.
     "
  }

  class cmd_update_options: project_options
  {
    "\h|UPDATE OPTIONS|"

    bool --immediate|-i
    {
      "Also update immediate dependencies."
    }

    bool --recursive|-r
    {
      "Also update all dependencies, recursively."
    }
  };

  "
   \h|DEFAULT OPTIONS FILES|

   See \l{bdep-default-options-files(1)} for an overview of the default
   options files. For the \cb{update} command the search start directory is
   the project directory. The following options files are searched for in
   each directory and, if found, loaded in the order listed:

   \
   bdep.options
   bdep-update.options
   \

   The following \cb{update} command options cannot be specified in the
   default options files:

   \
   --directory|-d
   \
  "
}
