From 09ef37f84eebf735dc7f5a65936044d27bb70590 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 | 16 +--------------- buildfile | 7 ++++--- hello/buildfile | 6 +++--- manifest | 4 ++-- tests/buildfile | 4 +--- version | 1 - 7 files changed, 13 insertions(+), 27 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 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 -- cgit v1.1