aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/buildfile
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2019-08-28 14:43:38 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2019-08-28 14:43:38 +0200
commit995585489750512a28f84b028b3eea30c3a9c075 (patch)
treec8f57bd54d42daa39539c4b46a8c635ff63ddb5d /libbuild2/buildfile
parentd0842f4a05ac691dc296347ff872eb7a9b83b42d (diff)
Reduce repetition in buildfiles
Diffstat (limited to 'libbuild2/buildfile')
-rw-r--r--libbuild2/buildfile7
1 files changed, 2 insertions, 5 deletions
diff --git a/libbuild2/buildfile b/libbuild2/buildfile
index 8d40c28..feabdab 100644
--- a/libbuild2/buildfile
+++ b/libbuild2/buildfile
@@ -77,7 +77,7 @@ objs{*}: cxx.poptions += -DLIBBUILD2_SHARED_BUILD
# used as the build system import path (unless cross-compiling and not
# forgetting to escape backslashes on Windows).
#
-obj{context}: cxx.poptions += "-DBUILD2_HOST_TRIPLET=\"$cxx.target\""
+{obja objs}{context}: cxx.poptions += "-DBUILD2_HOST_TRIPLET=\"$cxx.target\""
# Note that we used to compare complete target triplets but that proved too
# strict. For example, we may be running on x86_64-apple-darwin17.7.0 while
@@ -87,12 +87,9 @@ cross = ($cxx.target.cpu != $build.host.cpu || \
$cxx.target.system != $build.host.system)
if! $cross
- obj{context}: cxx.poptions += \
+ {obja objs}{context}: cxx.poptions += \
-DBUILD2_IMPORT_PATH=\"$regex.replace($out_root, '\\', '\\\\')\"
-obja{context}: cxx.poptions += -DLIBBUILD2_STATIC_BUILD
-objs{context}: cxx.poptions += -DLIBBUILD2_SHARED_BUILD
-
if ($cxx.target.class != 'windows')
{
cxx.libs += -lpthread