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

include <bdep/project.cli>;

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

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

    "\h|SYNOPSIS|

     \c{\b{bdep deinit} [<options>] [<pkg-spec>] [<cfg-spec>]}

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

     \h|DESCRIPTION|

     The \cb{deinit} command deinitializes the specified project packages
     (<pkg-spec>), or, if the project itself is specified (<prj-spec>), all
     its previously initialized packages, in one or more build configurations
     (<cfg-spec>).

     If no project 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.
     "
  }

  class cmd_deinit_options: project_options
  {
    "\h|DEINIT OPTIONS|"

    bool --force
    {
      "Deinitialize packages without attempting to remove them from the build
       configuration. This mode is primarily useful when the configuration
       directory has been removed or is otherwise unusable."
    }

    bool --no-fetch
    {
      "Do not re-fetch the repository information before attempting to replace
       packages being deinitialized with versions from repositories."
    }
  };

  "
   \h|DEFAULT OPTIONS FILES|

   See \l{bdep-default-options-files(1)} for an overview of the default
   options files. For the \cb{deinit} 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-deinit.options
   \

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

   \
   --directory|-d
   \
  "
}
