From 0037d0a7d91027e280ea5bbc6b19041f1233911c Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 28 Apr 2017 15:28:58 +0200 Subject: Switch to version module --- .gitignore | 2 ++ build/bootstrap.build | 17 +---------------- buildfile | 7 ++++--- hello/buildfile | 6 +++--- manifest | 4 ++-- tests/buildfile | 4 +--- version | 1 - 7 files changed, 13 insertions(+), 28 deletions(-) delete mode 100644 version 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 -- cgit v1.1