From 676a035c863a686391422e690e0a743b0d62d782 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 5 Mar 2018 18:19:59 +0200 Subject: Command line interface synopsis sketches for init and config commands --- bdep/bdep.cli | 13 +++++++++---- bdep/config.cli | 44 ++++++++++++++++++++++++++++++++++++++++++++ bdep/init.cli | 42 ++++++++++++++++++++++++++++++++++++++---- doc/cli.sh | 2 +- doc/style | 2 +- 5 files changed, 93 insertions(+), 10 deletions(-) create mode 100644 bdep/config.cli diff --git a/bdep/bdep.cli b/bdep/bdep.cli index 67460b0..637803c 100644 --- a/bdep/bdep.cli +++ b/bdep/bdep.cli @@ -15,10 +15,10 @@ namespace bdep "\h|SYNOPSIS| - \cb{bdep --help}\n - \cb{bdep --version}\n - \c{\b{bdep help} [ | ]}\n - \c{\b{bdep} [] [] } + \c{\b{bdep --help}\n + \b{bdep --version}\n + \b{bdep help} [ | ]\n + \b{bdep} [] [] } \h|DESCRIPTION| @@ -59,6 +59,11 @@ namespace bdep "" } + bool config + { + "\l{bdep-config(1)} \- manage project's build configurations" + } + bool init { "\l{bdep-init(1)} \- @@ TODO" diff --git a/bdep/config.cli b/bdep/config.cli new file mode 100644 index 0000000..73d5444 --- /dev/null +++ b/bdep/config.cli @@ -0,0 +1,44 @@ +// file : bdep/config.cli +// copyright : Copyright (c) 2014-2017 Code Synthesis Ltd +// license : MIT; see accompanying LICENSE file + +include ; + +"\section=1" +"\name=bdep-config" +"\summary=manage project build configurations" + +namespace bdep +{ + { + " + + + ", + + "\h|SYNOPSIS| + + \c{\b{bdep config add} \ \ \ [] [] [\b{@}] \n + \b{bdep config create} [] [] [\b{@}] []\n + \b{bdep config remove} [] [] } + + \c{ = \b{--directory}|\b{-d} \n + = ( | )...\n + = (\b{@} | \b{--config}|\b{-c} )... | \b{--all}|\b{-a}} + + \h|DESCRIPTION| + + The \cb{config} command..." + } + + class config_options: common_options + { + "\h|CONFIG OPTIONS|" + + bool --default|-d + { + //@@ Need to explain what it means. + "Make the added or created configuration default." + } + }; +} diff --git a/bdep/init.cli b/bdep/init.cli index 75178f8..f91fbc0 100644 --- a/bdep/init.cli +++ b/bdep/init.cli @@ -6,20 +6,54 @@ include ; "\section=1" "\name=bdep-init" -"\summary=@@ TODO" +"\summary=initialize project dependency management" namespace bdep { { - "", + " + + + + + ", "\h|SYNOPSIS| - \c{\b{bdep init} [] @@ TODO} + \c{\b{bdep init} [] [] [] []\n + \b{bdep init} [] [] \b{--add} [\b{@}]\n + \b{bdep init} [] [] \b{--create} [\b{@}] []\n + \b{bdep init} [] [] \b{--empty}} + + \c{ = \b{--directory}|\b{-d} \n + = (\b{--directory}|\b{-d} )... | \n + = (\b{@} | \b{--config}|\b{-c} )... | \b{--all}|\b{-a}\n + = ( | )...\n + = ( | )...} \h|DESCRIPTION| - The \cb{init} command..." + The \cb{init} command... + + If is omitted, then the default configuration is assumed. + + If is omitted, then the current working directory is + assumed. In this case the current directory must be either a project + directory (), a package directory () or a subdirectory + of package directory. + + are arguments to \cb{bpkg cfg-create}. are arguments + to \cb{bpkg pkg-build}. + + In the first variant the configurations can also be specified as + directories using the \cb{--config|-c} option. + + The second and third variants are semantically equivalent to first + performing \cb{config add} and \cb{config create} (\l{bdep-config(1)}), + respectively, followed by the first variant. In both cases the + \cb{--default|-d} option can be used to make the added/created + configuration default. + " } class init_options: common_options diff --git a/doc/cli.sh b/doc/cli.sh index d06c181..2913b59 100755 --- a/doc/cli.sh +++ b/doc/cli.sh @@ -56,7 +56,7 @@ o="--output-prefix bdep- --class-doc bdep::common_options=short" compile "common" $o --output-suffix "-options" --class-doc bdep::common_options=long compile "bdep" $o --output-prefix "" --suppress-undocumented --class-doc bdep::commands=short --class-doc bdep::topics=short -pages="bdep common help init" +pages="config help init" for p in $pages; do compile $p $o diff --git a/doc/style b/doc/style index 658436a..f9ae99d 160000 --- a/doc/style +++ b/doc/style @@ -1 +1 @@ -Subproject commit 658436a9522b5a0d016c3da0253708093607f95d +Subproject commit f9ae99d1bef56a056cbcac5a4411cfdd3e76ac3a -- cgit v1.1