aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--build/root.build9
-rw-r--r--load/buildfile12
-rw-r--r--migrate/buildfile12
-rw-r--r--mod/buildfile12
4 files changed, 21 insertions, 24 deletions
diff --git a/build/root.build b/build/root.build
index 126c0f4..b273cae 100644
--- a/build/root.build
+++ b/build/root.build
@@ -15,15 +15,12 @@ cxx.poptions =+ "-I$out_root" "-I$src_root"
# Load the cli module but only if it's available. This way a distribution
# that includes pre-generated files can be built without installing cli.
+# This is also the reason why we need to explicitly spell out individual
+# source file prerequisites instead of using the cli.cxx{} group (it won't
+# be there unless the module is configured).
#
using? cli
-if! $cli.configured
-{
- define cli: file
- cli{*}: extension = cli
-}
-
# All exe{} in tests/ are, well, tests.
#
tests/exe{*}: test = true
diff --git a/load/buildfile b/load/buildfile
index 1eab23f..530dc72 100644
--- a/load/buildfile
+++ b/load/buildfile
@@ -17,16 +17,16 @@ exe{brep-load}: \
# Generated options parser.
#
-{hxx ixx cxx}{load-options}: cli{load}
-
if $cli.configured
{
+ cli.cxx{load-options}: cli{load}
+
cli.options += -I $src_root --include-with-brackets --include-prefix load \
--guard-prefix LOAD --generate-specifier --page-usage print_ --ansi-color \
--cxx-prologue "#include <load/types-parsers>" \
--long-usage
-}
-# Include generated cli files into the distribution.
-#
-{hxx ixx cxx}{load-options}: dist = true
+ # Include generated cli files into the distribution.
+ #
+ cli.cxx{load-options}: dist = true
+}
diff --git a/migrate/buildfile b/migrate/buildfile
index 72d7f2e..6b2ddd1 100644
--- a/migrate/buildfile
+++ b/migrate/buildfile
@@ -15,15 +15,15 @@ exe{brep-migrate}: \
# Generated options parser.
#
-{hxx ixx cxx}{migrate-options}: cli{migrate}
-
if $cli.configured
{
+ cli.cxx{migrate-options}: cli{migrate}
+
cli.options += -I $src_root --include-with-brackets --include-prefix migrate \
--guard-prefix MIGRATE --generate-specifier --page-usage print_ --ansi-color \
--long-usage
-}
-# Include generated cli files into the distribution.
-#
-{hxx ixx cxx}{migrate-options}: dist = true
+ # Include generated cli files into the distribution.
+ #
+ cli.cxx{migrate-options}: dist = true
+}
diff --git a/mod/buildfile b/mod/buildfile
index 69eedb6..228c149 100644
--- a/mod/buildfile
+++ b/mod/buildfile
@@ -49,10 +49,10 @@ mod{brep}: \
# Generated options parser.
#
-{hxx ixx cxx}{options}: cli{options}
-
if $cli.configured
{
+ cli.cxx{options}: cli{options}
+
# Set option prefix to the empty value to handle all unknown request
# parameters uniformly with a single catch block.
#
@@ -61,8 +61,8 @@ if $cli.configured
--cxx-prologue "#include <mod/types-parsers>" \
--cli-namespace brep::cli --generate-file-scanner --suppress-usage \
--generate-modifier --generate-description --option-prefix ""
-}
-# Include generated cli files into the distribution.
-#
-{hxx ixx cxx}{options}: dist = true
+ # Include generated cli files into the distribution.
+ #
+ cli.cxx{options}: dist = true
+}