diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2020-02-13 12:27:19 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2020-02-13 12:29:04 +0200 |
commit | 8ab23ad062f53ed32107f19d7e855c07992eb517 (patch) | |
tree | 92947aa8a46b81030d5bcf9cce1d57b55dfadb1c /bdep/new.cli | |
parent | a90f24b0f3923c47318f063c0c9684452c431e1f (diff) |
Add --type|-t,source sub-option for customizing source subdirectory
For example:
$ bdep new -l c++ -t lib,source=libhello/io libhello-io
Diffstat (limited to 'bdep/new.cli')
-rw-r--r-- | bdep/new.cli | 31 |
1 files changed, 26 insertions, 5 deletions
diff --git a/bdep/new.cli b/bdep/new.cli index 9340f85..93d8aaf 100644 --- a/bdep/new.cli +++ b/bdep/new.cli @@ -72,8 +72,8 @@ namespace bdep $ bdep new -t empty hello $ cd hello - $ bdep new --package -l c++ -t lib libhello - $ bdep new --package -l c++ -t exe hello + $ bdep new --package -l c++ -t lib libhello + $ bdep new --package -l c++ -t exe hello $ bdep init -C @gcc cc config.cxx=g++ \ @@ -83,8 +83,8 @@ namespace bdep The \cb{--subdirectory} form operates \i{as-if} by first creating according to <spec> a temporary project called <name> and then copying - its source subdirectory (\c{\i{name}\b{/}\i{name}\b{/}}) over to the - current working directory (unless overridden with + its source subdirectory (\c{\i{name}\b{/}\i{name}\b{/}} by default) over + to the current working directory (unless overridden with \c{\b{--output-dir}|\b{-o}}). If no project/package directory is explicitly specified with \c{\b{--directory}|\b{-d}}, then the current working directory is assumed. For example: @@ -94,7 +94,7 @@ namespace bdep $ cd hello $ bdep new --subdirectory -l c++ -t lib libhello - $ bdep new --subdirectory -l c++ -t exe hello + $ bdep new --subdirectory -l c++ -t exe hello $ bdep init -C @gcc cc config.cxx=g++ \ @@ -107,6 +107,17 @@ namespace bdep used as the project/package/subdirectory name. See \l{bpkg#package-name Package Name} for details on project/package names. + The source subdirectory can be customized with the \cb{source} project + type sub-option (see below for details). For example: + + \ + $ bdep new -l c++ -t lib,source=libhello/io libhello-io + \ + + After executing this command the \cb{libhello-io} project will contain + the \cb{libhello/io/} source subdirectory instead of the default + \cb{libhello-io/}. + The output directory may already contain existing files provided they don't clash with the files to be created. The \cb{new} command also recognizes certain well-known files and tries to use the extracted @@ -222,6 +233,10 @@ namespace bdep Don't add support for installing.| + \li|\n\ \ \ \c{\b{source=}\i{dir}} + + Alternative source subdirectory relative to project/package root.| + \li|\n\ \ \ \c{\b{license=}\i{name}}| \li|\ \ \ \cb{no-readme}| @@ -253,6 +268,10 @@ namespace bdep Don't add support for generating the version header.| + \li|\n\ \ \ \c{\b{source=}\i{dir}} + + Alternative source subdirectory relative to project/package root.| + \li|\n\ \ \ \c{\b{license=}\i{name}}| \li|\ \ \ \cb{no-readme}| @@ -369,6 +388,7 @@ namespace bdep bool no-tests; bool unit-tests; bool no-install; + dir_path "source"; string license = "proprietary"; bool no-readme; bool alt-naming; @@ -380,6 +400,7 @@ namespace bdep bool unit-tests; bool no-install; bool no-version; + dir_path "source"; string license = "proprietary"; bool no-readme; bool alt-naming; |