aboutsummaryrefslogtreecommitdiff
path: root/build2/buildfile
diff options
context:
space:
mode:
Diffstat (limited to 'build2/buildfile')
-rw-r--r--build2/buildfile42
1 files changed, 7 insertions, 35 deletions
diff --git a/build2/buildfile b/build2/buildfile
index 4d62fb5..0111ed2 100644
--- a/build2/buildfile
+++ b/build2/buildfile
@@ -5,16 +5,19 @@
#
libs = $libbutl
+# NOTE: don't forget to also update bpkg's buildfile if changing anything
+# here.
+#
include ../libbuild2/
libs += ../libbuild2/lib{build2}
-for m: bash bin c cc cxx in version
+for m: bash bin c cc cli cxx in version
{
include ../libbuild2/$m/
libs += ../libbuild2/$m/lib{build2-$m}
}
-exe{b}: {hxx ixx txx cxx}{** -b-options} {hxx ixx cxx}{b-options} $libs
+exe{b}: {hxx ixx txx cxx}{**} $libs
# Target metadata, see also --build2-metadata in b.cxx.
#
@@ -42,6 +45,8 @@ copyright = $process.run_regex( \
obj{b}: cxx.poptions += -DBUILD2_COPYRIGHT=\"$copyright\"
+# NOTE: remember to update bpkg buildfile if changing anything here.
+#
switch $cxx.target.class
{
case 'linux'
@@ -68,36 +73,3 @@ switch $cxx.target.class
: "-Wl,--stack,$stack_size")
}
}
-
-# Generated options parser.
-#
-if $cli.configured
-{
- cli.cxx{b-options}: cli{b}
-
- cli.options += --std c++11 -I $src_root --include-with-brackets \
---include-prefix build2 --guard-prefix BUILD2 \
---cxx-prologue "#include <build2/types-parsers.hxx>" \
---cli-namespace build2::cl --generate-file-scanner --keep-separator \
---generate-parse --generate-merge --generate-specifier
-
- # Usage options.
- #
- cli.options += --suppress-undocumented --long-usage --ansi-color \
---page-usage 'build2::print_$name$_' --option-length 21
-
- cli.cxx{*}:
- {
- # Include the generated cli files into the distribution and don't remove
- # them when cleaning in src (so that clean results in a state identical to
- # distributed).
- #
- dist = true
- clean = ($src_root != $out_root)
-
- # We keep the generated code in the repository so copy it back to src in
- # case of a forwarded configuration.
- #
- backlink = overwrite
- }
-}