aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/buildfile
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2019-08-21 12:11:48 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2019-08-21 12:11:48 +0200
commitd64ae97f6865bc25d496485622530e2a090c2eb4 (patch)
treeeef35c80417a9a08c7713368261aa6d1e8632b5d /libbuild2/buildfile
parentd7b5f03a761714f6ea6c4b1891e8a1f3824d4979 (diff)
Implement dynamic loading of build system modules
Diffstat (limited to 'libbuild2/buildfile')
-rw-r--r--libbuild2/buildfile11
1 files changed, 11 insertions, 0 deletions
diff --git a/libbuild2/buildfile b/libbuild2/buildfile
index 6539a01..7d91e08 100644
--- a/libbuild2/buildfile
+++ b/libbuild2/buildfile
@@ -2,6 +2,9 @@
# copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
# license : MIT; see accompanying LICENSE file
+# NOTE: remember to update bundled_modules in libbuild2/modules.cxx if adding
+# a new module.
+#
./: lib{build2} bash/ in/ version/
import int_libs = libbutl%lib{butl}
@@ -13,6 +16,9 @@ lib{build2}: libul{build2}: {hxx ixx txx cxx}{* -config -version -*.test...} \
# tests loop below). Note that the build system core can still function
# without them or with their alternative implementations.
#
+# NOTE: remember to update import_modules() in libbuild2/modules.cxx if adding
+# a new such module.
+#
for m: config dist install test
libul{build2}: $m/{hxx ixx txx cxx}{** -**-options -**.test...}
@@ -67,8 +73,13 @@ obja{context}: cxx.poptions += -DLIBBUILD2_STATIC_BUILD
objs{context}: cxx.poptions += -DLIBBUILD2_SHARED_BUILD
if ($cxx.target.class != "windows")
+{
cxx.libs += -lpthread
+ if ($cxx.target.class != "bsd")
+ cxx.libs += -ldl
+}
+
# Export options.
#
lib{build2}: