aboutsummaryrefslogtreecommitdiff
path: root/libbuild2
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2019-08-15 11:11:43 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2019-08-15 11:11:43 +0200
commit3f44e2e791d4a067ff16b5246463487a25371880 (patch)
tree1199f1fe701b684c787f10fa667c570cd0b471dc /libbuild2
parentd33558b7335a469942e204f73de6faed81f8041f (diff)
Embed build core version into build system modules as load path
Diffstat (limited to 'libbuild2')
-rw-r--r--libbuild2/bash/buildfile13
-rw-r--r--libbuild2/in/buildfile13
-rw-r--r--libbuild2/version/buildfile13
3 files changed, 27 insertions, 12 deletions
diff --git a/libbuild2/bash/buildfile b/libbuild2/bash/buildfile
index e1a9f53..ed95998 100644
--- a/libbuild2/bash/buildfile
+++ b/libbuild2/bash/buildfile
@@ -50,10 +50,15 @@ libs{build2-bash}: cxx.export.poptions += -DLIBBUILD2_BASH_SHARED
# in place of another pre-release or the final version. See the version module
# for details on the version.* variable values.
#
-if $version.pre_release
- lib{build2-bash}: bin.lib.version = @"-$version.project_id"
-else
- lib{build2-bash}: bin.lib.version = @"-$version.major.$version.minor"
+# And seeing that this is a build system module, we also embed the same
+# version as the build system core version.
+#
+ver = ($version.pre_release \
+ ? "$version.project_id" \
+ : "$version.major.$version.minor")
+
+lib{build2-bash}: bin.lib.version = @"-$ver"
+libs{build2-bash}: bin.lib.load_suffix = "-$ver"
# Install into the libbuild2/bash/ subdirectory of, say, /usr/include/
# recreating subdirectories.
diff --git a/libbuild2/in/buildfile b/libbuild2/in/buildfile
index ae07e27..aa5af87 100644
--- a/libbuild2/in/buildfile
+++ b/libbuild2/in/buildfile
@@ -47,10 +47,15 @@ libs{build2-in}: cxx.export.poptions += -DLIBBUILD2_IN_SHARED
# in place of another pre-release or the final version. See the version module
# for details on the version.* variable values.
#
-if $version.pre_release
- lib{build2-in}: bin.lib.version = @"-$version.project_id"
-else
- lib{build2-in}: bin.lib.version = @"-$version.major.$version.minor"
+# And seeing that this is a build system module, we also embed the same
+# version as the build system core version.
+#
+ver = ($version.pre_release \
+ ? "$version.project_id" \
+ : "$version.major.$version.minor")
+
+lib{build2-in}: bin.lib.version = @"-$ver"
+libs{build2-in}: bin.lib.load_suffix = "-$ver"
# Install into the libbuild2/in/ subdirectory of, say, /usr/include/
# recreating subdirectories.
diff --git a/libbuild2/version/buildfile b/libbuild2/version/buildfile
index e9d4905..7477815 100644
--- a/libbuild2/version/buildfile
+++ b/libbuild2/version/buildfile
@@ -51,10 +51,15 @@ libs{build2-version}: cxx.export.poptions += -DLIBBUILD2_VERSION_SHARED
# in place of another pre-release or the final version. See the version module
# for details on the version.* variable values.
#
-if $version.pre_release
- lib{build2-version}: bin.lib.version = @"-$version.project_id"
-else
- lib{build2-version}: bin.lib.version = @"-$version.major.$version.minor"
+# And seeing that this is a build system module, we also embed the same
+# version as the build system core version.
+#
+ver = ($version.pre_release \
+ ? "$version.project_id" \
+ : "$version.major.$version.minor")
+
+lib{build2-version}: bin.lib.version = @"-$ver"
+libs{build2-version}: bin.lib.load_suffix = "-$ver"
# Install into the libbuild2/version/ subdirectory of, say, /usr/include/
# recreating subdirectories.