From ca650053f66bb4b9f4f1de87aa41e8353bc97e1c Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 4 Jun 2019 13:38:11 +0200 Subject: Add --existing|-e option to bpkg-cfg-create With this option cfg-create initializes a bpkg configuration based on an existing build system configuration instead of creating a new one. --- bpkg/cfg-create.cli | 31 ++++++++++++++++++++----------- 1 file changed, 20 insertions(+), 11 deletions(-) (limited to 'bpkg/cfg-create.cli') diff --git a/bpkg/cfg-create.cli b/bpkg/cfg-create.cli index bac601d..571c614 100644 --- a/bpkg/cfg-create.cli +++ b/bpkg/cfg-create.cli @@ -16,25 +16,28 @@ namespace bpkg "\h|SYNOPSIS| - \c{\b{bpkg cfg-create}|\b{create} [] []} + \c{\b{bpkg cfg-create}|\b{create} [] []\n + \b{bpkg cfg-create}|\b{create} [] \b{--existing|-e}} \c{ = ( | )...} \h|DESCRIPTION| The \cb{cfg-create} command creates a new \cb{bpkg} configuration with - the specified \cb{build2} modules and configuration variables. The - \cb{bpkg} configuration itself is a build system configuration; see - build system driver (\l{b(1)}) \cb{create} meta-operation for details. + the specified \cb{build2} modules and configuration variables (the first + form) or initializes one based on an existing build system configuration + (the second form). The \cb{bpkg} configuration itself is a build system + configuration; see build system driver (\l{b(1)}) \cb{create} + meta-operation for details. - Unless the \cb{--wipe} option is specified, \cb{cfg-create} expects the - configuration directory to be empty or to not exist (in which case it - will be created). + Unless the \cb{--existing|-e} or \cb{--wipe} option is specified, + \cb{cfg-create} expects the configuration directory to be empty or to not + exist (in which case it will be created). - By default, the resulting configuration loads the \cb{config}, \cb{test}, - \cb{dist}, and \cb{install} modules. However, additional modules and, if - required, their configuration variables can be specified as the - \cb{cfg-create} arguments. For example: + By default, the configuration created with the first form loads the + \cb{config}, \cb{test}, \cb{dist}, and \cb{install} modules. However, + additional modules and, if required, their configuration variables can be + specified as the \cb{cfg-create} arguments. For example: \ bpkg create cxx config.cxx=clang++ config.install.root=/usr/local @@ -63,6 +66,12 @@ namespace bpkg directory." } + bool --existing|-e + { + "Initialize a \cb{bpkg} configuration based on an existing build system + configuration." + } + bool --wipe { "Wipe the configuration directory clean before creating the new -- cgit v1.1