From 4a23b4cdf3102a8fef8ac6ebd8a884cd613c28ee Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 26 Aug 2019 17:24:48 +0200 Subject: Implement auto-import of development build2 build --- libbuild2/buildfile | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) (limited to 'libbuild2/buildfile') 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 -- cgit v1.1