aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/buildfile
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2019-08-26 17:24:48 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2019-08-26 18:04:22 +0200
commit4a23b4cdf3102a8fef8ac6ebd8a884cd613c28ee (patch)
tree9fdd028cddde76ea4037c55fd7430950a0d05dd5 /libbuild2/buildfile
parent4177d70e63893d0a2c76beb9166ebbf79c4697a0 (diff)
Implement auto-import of development build2 build
Diffstat (limited to 'libbuild2/buildfile')
-rw-r--r--libbuild2/buildfile20
1 files changed, 16 insertions, 4 deletions
diff --git a/libbuild2/buildfile b/libbuild2/buildfile
index 7d91e08..deda991 100644
--- a/libbuild2/buildfile
+++ b/libbuild2/buildfile
@@ -9,8 +9,14 @@
import int_libs = libbutl%lib{butl}
-lib{build2}: libul{build2}: {hxx ixx txx cxx}{* -config -version -*.test...} \
- {hxx}{config version}
+lib{build2}: libul{build2}: \
+ {hxx ixx txx cxx}{* -utility-installed -config -version -*.test...} \
+ {hxx}{config version}
+
+# Note that this won't work on libul{} since it's never installed.
+#
+lib{build2}: cxx{utility-installed}: for_install = true
+liba{build2}: bin.whole = true # See utility-installed.cxx.
# These are "core modules" that come bundled with libbuild2 (see also unit
# tests loop below). Note that the build system core can still function
@@ -66,9 +72,15 @@ for t: cxx{ *.test...} \
obja{*}: cxx.poptions += -DLIBBUILD2_STATIC_BUILD
objs{*}: cxx.poptions += -DLIBBUILD2_SHARED_BUILD
-# Pass our compiler target to be used as libbuild2 host.
+# Pass our compiler target to be used as build2 host and our out_root to
+# be used as the build system import path.
#
-obj{context}: cxx.poptions += -DBUILD2_HOST_TRIPLET=\"$cxx.target\"
+obj{context}:
+{
+ cxx.poptions += "-DBUILD2_HOST_TRIPLET=\"$cxx.target\""
+ cxx.poptions += "-DBUILD2_IMPORT_PATH=\"$out_root\""
+}
+
obja{context}: cxx.poptions += -DLIBBUILD2_STATIC_BUILD
objs{context}: cxx.poptions += -DLIBBUILD2_SHARED_BUILD