summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2017-04-28 15:28:58 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2017-04-28 15:28:58 +0200
commit09ef37f84eebf735dc7f5a65936044d27bb70590 (patch)
tree60178dbf470a5cbf451f7b9626f98f4e7bb6079e
parentc2e5c72f11fc5991ca508545d300c9b9edf64e33 (diff)
Switch to version module
-rw-r--r--.gitignore2
-rw-r--r--build/bootstrap.build16
-rw-r--r--buildfile7
-rw-r--r--hello/buildfile6
-rw-r--r--manifest4
-rw-r--r--tests/buildfile4
-rw-r--r--version1
7 files changed, 13 insertions, 27 deletions
diff --git a/.gitignore b/.gitignore
index 01994ef..3947522 100644
--- a/.gitignore
+++ b/.gitignore
@@ -11,3 +11,5 @@
*.exe
*.exe.dlls/
*.exe.manifest
+
+version
diff --git a/build/bootstrap.build b/build/bootstrap.build
index 0aa6b53..1ff153d 100644
--- a/build/bootstrap.build
+++ b/build/bootstrap.build
@@ -1,20 +1,6 @@
project = libhello
-using build@0.4.0
-
-version = 1.1.0
-abi_major = 1
-abi_minor = 1
-abi_patch = 0
-abi_prerelease = false
-
-revision = 0
-
-dist.package = $project-$version
-
-if ($revision != 0)
- dist.package += +$revision
-
+using version
using config
using dist
using test
diff --git a/buildfile b/buildfile
index a416648..57e0f35 100644
--- a/buildfile
+++ b/buildfile
@@ -1,6 +1,7 @@
-d = hello/ tests/
-./: $d doc{INSTALL version} file{manifest}
-include $d
+./: hello/ tests/ doc{INSTALL version} file{manifest}
+
+doc{version}: file{manifest} # Generated by the version module.
+doc{version}: dist = true
# Don't install tests or the INSTALL file.
#
diff --git a/hello/buildfile b/hello/buildfile
index fc85f49..d2a4a66 100644
--- a/hello/buildfile
+++ b/hello/buildfile
@@ -6,10 +6,10 @@ lib{hello}: {hxx cxx}{hello} hxx{export} $imp_libs $int_libs
# For pre-releases use the complete version to make sure they cannot be used
# in place of another pre-release or the final version.
#
-if $abi_prerelease
- lib{hello}: bin.lib.version = @-$version
+if $version.pre_release
+ lib{hello}: bin.lib.version = @"-$version.project_id"
else
- lib{hello}: bin.lib.version = @-$abi_major.$abi_minor
+ lib{hello}: bin.lib.version = @"-$version.major.$version.minor"
cxx.poptions =+ "-I$src_root"
obja{*}: cxx.poptions += -DLIBHELLO_STATIC_BUILD
diff --git a/manifest b/manifest
index d4b6c14..fee9ce7 100644
--- a/manifest
+++ b/manifest
@@ -12,7 +12,7 @@ url: http://www.example.org/libhello
email: hello-users@example.org
build-email: builds@build2.org
requires: c++11
-depends: * build2 >= 0.4.0
-depends: * bpkg >= 0.4.0
+depends: * build2 >= 0.5.0-
+depends: * bpkg >= 0.5.0-
depends: libformat [1.0.0 2.0.0-); compatible with libformat-1.X.Y
depends: libprint [1.0.0 2.0.0-); compatible with libprint-1.X.Y
diff --git a/tests/buildfile b/tests/buildfile
index 4dcbe2a..1a8bcc9 100644
--- a/tests/buildfile
+++ b/tests/buildfile
@@ -1,3 +1 @@
-d = test/
-./: $d
-include $d
+./: test/
diff --git a/version b/version
deleted file mode 100644
index 9084fa2..0000000
--- a/version
+++ /dev/null
@@ -1 +0,0 @@
-1.1.0