aboutsummaryrefslogtreecommitdiff
path: root/bpkg/utility.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2016-08-17 14:40:59 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2016-08-17 14:40:59 +0200
commit46fdd9eb995af4f704b283f0e6ce2c54d2e43d5c (patch)
tree9fe403084c5862e4d751028f5e964dbd6dd99c47 /bpkg/utility.cxx
parent112c57a03bb76413067e4856a6c6492c0a1bbfa5 (diff)
If bpkg has exe.suffix, use it for the default build2 name
So if bpkg is called bpkg-stage, then we by default look for b-stage.
Diffstat (limited to 'bpkg/utility.cxx')
-rw-r--r--bpkg/utility.cxx6
1 files changed, 5 insertions, 1 deletions
diff --git a/bpkg/utility.cxx b/bpkg/utility.cxx
index 9bf1a5a..a26ab3c 100644
--- a/bpkg/utility.cxx
+++ b/bpkg/utility.cxx
@@ -199,7 +199,11 @@ namespace bpkg
const strings& pvars,
const strings& cvars)
{
- cstrings args {co.build ().string ().c_str ()};
+ const char* b (co.build_specified ()
+ ? co.build ().string ().c_str ()
+ : "b" BPKG_EXE_SUFFIX);
+
+ cstrings args {b};
// Map verbosity level. If we are running quiet or at level 1,
// then run build2 quiet. Otherwise, run it at the same level