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
commit0037d0a7d91027e280ea5bbc6b19041f1233911c (patch)
tree418da3de1e7ba381560ddad82e09d20e13de782a
parent26ea95d6003125f868ad5b2ff129d9203d6b11eb (diff)
Switch to version module
-rw-r--r--.gitignore2
-rw-r--r--build/bootstrap.build17
-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, 28 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 64eb397..1ff153d 100644
--- a/build/bootstrap.build
+++ b/build/bootstrap.build
@@ -1,21 +1,6 @@
project = libhello
-using build@0.4.0
-
-version = 1.0.0
-
-abi_major = 1
-abi_minor = 0
-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 5c8d6db..ddf8843 100644
--- a/hello/buildfile
+++ b/hello/buildfile
@@ -3,10 +3,10 @@ lib{hello}: {hxx cxx}{hello} hxx{export}
# 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 bbb7f74..3252b91 100644
--- a/manifest
+++ b/manifest
@@ -12,5 +12,5 @@ url: http://www.example.org/libhello
email: hello-users@example.org
build-email: builds@build2.org
requires: c++11
-depends: * build2 >= 0.4.0-a1
-depends: * bpkg >= 0.4.0-a1
+depends: * build2 >= 0.5.0-
+depends: * bpkg >= 0.5.0-
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 3eefcb9..0000000
--- a/version
+++ /dev/null
@@ -1 +0,0 @@
-1.0.0