From 995585489750512a28f84b028b3eea30c3a9c075 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 28 Aug 2019 14:43:38 +0200 Subject: Reduce repetition in buildfiles --- libbuild2/buildfile | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'libbuild2/buildfile') 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 -- cgit v1.1