aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2016-09-01 17:22:53 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2016-09-01 17:22:53 +0200
commit2916a5ffaece5f10bb6462d24c6e5d589844736b (patch)
tree7100bcd65af79081bb454e02794ec80c0bd6fa6a
parent14eac5fa9f5fc48e51a406f85f90ee65d49c56a3 (diff)
Only set cli.options if cli is configured
-rw-r--r--bpkg/buildfile25
1 files changed, 14 insertions, 11 deletions
diff --git a/bpkg/buildfile b/bpkg/buildfile
index 0835798..f9fcde9 100644
--- a/bpkg/buildfile
+++ b/bpkg/buildfile
@@ -104,22 +104,25 @@ obj{utility}: cxx.poptions += -DBPKG_EXE_SUFFIX='"'$bin.exe.suffix'"'
{hxx cxx}{repository-signing}: cli{repository-signing}
{hxx cxx}{repository-signing}: dist = true
-# Option length must be the same to get commands/topics/options aligned.
-#
-cli.options += -I $src_root --include-with-brackets --include-prefix bpkg \
---guard-prefix BPKG --cxx-prologue "#include <bpkg/types-parsers>" \
+if $cli.configured
+{
+ # Option length must be the same to get commands/topics/options aligned.
+ #
+ cli.options += -I $src_root --include-with-brackets --include-prefix bpkg \
+--guard-prefix BPKG --cxx-prologue "#include <bpkg/types-parsers>" \
--cli-namespace bpkg::cli --generate-vector-scanner --generate-file-scanner \
---generate-specifier --generate-parse --page-usage 'bpkg::print_$name$_' \
+--generate-specifier --generate-parse --page-usage 'bpkg::print_$name$_' \
--ansi-color --include-base-last --option-length 23
-cli.cxx{common-options}: cli.options += --short-usage --long-usage # Both.
-cli.cxx{bpkg-options}: cli.options += --short-usage --suppress-undocumented
+ cli.cxx{common-options}: cli.options += --short-usage --long-usage # Both.
+ cli.cxx{bpkg-options}: cli.options += --short-usage --suppress-undocumented
-cli.options += --long-usage # All other pages -- long usage.
+ cli.options += --long-usage # All other pages -- long usage.
-# Avoid generating CLI runtime and empty inline file for help topics.
-#
-cli.cxx{repository-signing}: cli.options += --suppress-cli --suppress-inline
+ # Avoid generating CLI runtime and empty inline file for help topics.
+ #
+ cli.cxx{repository-signing}: cli.options += --suppress-cli --suppress-inline
+}
# Include generated cli files into the distribution.
#