From 7179b830556098dd09a01c7277fc37112ee9a45f Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 13 Aug 2019 12:26:58 +0200 Subject: Document now optional project/package/subdirectory name in bdep-new --- bdep/new.cli | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/bdep/new.cli b/bdep/new.cli index 3cd6ce5..03cf531 100644 --- a/bdep/new.cli +++ b/bdep/new.cli @@ -22,12 +22,12 @@ namespace bdep "\h|SYNOPSIS| - \c{\b{bdep new} [] [\b{--no-init}] \n - \b{bdep new} [] \b{--config-add|-A} [\b{@}] \n - \b{bdep new} [] \b{--config-create|-C} [\b{@}] \n + \c{\b{bdep new} [] [\b{--no-init}] []\n + \b{bdep new} [] \b{--config-add|-A} [\b{@}] []\n + \b{bdep new} [] \b{--config-create|-C} [\b{@}] []\n \ \ \ \ \ \ \ \ \ []\n - \b{bdep new} [] \b{--package} [] \n - \b{bdep new} [] \b{--subdirectory} [] } + \b{bdep new} [] \b{--package} [] []\n + \b{bdep new} [] \b{--subdirectory} [] []} \c{ \ \ \ \ = [] [] []\n \ \ \ \ = \b{--type}|\b{-t} (\b{exe}|\b{lib}|\b{bare}|\b{empty})[\b{,}...]\n @@ -45,8 +45,6 @@ namespace bdep \cb{--subdirectory} first create according to a new \cb{build2} project/package called in the subdirectory of the current working directory (unless overridden with \c{\b{--output-dir}|\b{-o}}). - See \l{bpkg#package-name Package Name} for details on project/package - names. The first form then, unless the \cb{--no-init} option is specified, initializes an empty project database as if by executing the @@ -105,6 +103,20 @@ namespace bdep After executing these commands the \cb{hello} project will contain two source subdirectories, \cb{libhello/} and \cb{hello/}. + In all the forms, if is omitted, then the current working + directory name (unless overridden with \c{\b{--output-dir}|\b{-o}}) is + used as the project/package/subdirectory name. See \l{bpkg#package-name + Package Name} for details on project/package names. For example: + + \ + $ # Create a project on one of the Git hosting services. + + $ git clone .../libhello.git + $ cd libhello + + $ bdep new -t lib -l c++ + \ + The project parameters such as type (executable, library, etc), language, and version control system can be customized as described next. Some of these parameters also support parameter-specific sub-options (such as the -- cgit v1.1