From 1d1335b5ff32c55aad049617d92fe1bbced46572 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Wed, 31 Aug 2016 00:38:12 +0300 Subject: Build infrastructure update --- bpkg/buildfile | 29 ++++++--------------- build/bootstrap.build | 14 +++++++--- build/root.build | 18 +++++++++++-- buildfile | 5 +++- manifest | 4 +-- .../common/hello/libhello-1.0.0+1.tar.gz | Bin 2145 -> 2160 bytes .../common/libhello-1.0.0+1/build/root.build | 2 +- tests/test.sh | 2 +- 8 files changed, 43 insertions(+), 31 deletions(-) diff --git a/bpkg/buildfile b/bpkg/buildfile index 551e9c0..0835798 100644 --- a/bpkg/buildfile +++ b/bpkg/buildfile @@ -52,7 +52,7 @@ exe{bpkg}: \ {hxx cxx}{ types-parsers } \ {hxx cxx}{ utility } \ {hxx }{ wrapper-traits } \ -$libs + $libs # Disable VC "unknown pragma" warning. # @@ -61,26 +61,8 @@ if ($cxx.id == "msvc") obj{utility}: cxx.poptions += -DBPKG_EXE_SUFFIX='"'$bin.exe.suffix'"' -# Load the cli module but only if it's available. This way a distribution -# that includes pre-generated files can be built without installing cli. -# This is also the reason why above we explicitly spelled out individual -# source files instead of using the cli.cxx{} group (it won't be there -# unless the module is loaded). +# General topics and common options. # -using? cli - -if! $cli.loaded -{ - define cli: file - cli{*}: extension = cli -} - -# Include generated cli files into the distribution. -# -hxx{*-options}: dist = true -ixx{*-options}: dist = true -cxx{*-options}: dist = true - {hxx ixx cxx}{common-options}: cli{common} {hxx ixx cxx}{configuration-options}: cli{configuration} {hxx ixx cxx}{bpkg-options}: cli{bpkg} @@ -91,7 +73,6 @@ cxx{*-options}: dist = true # pkg-* command. # - {hxx ixx cxx}{pkg-build-options}: cli{pkg-build} {hxx ixx cxx}{pkg-clean-options}: cli{pkg-clean} {hxx ixx cxx}{pkg-configure-options}: cli{pkg-configure} @@ -139,3 +120,9 @@ cli.options += --long-usage # All other pages -- long usage. # Avoid generating CLI runtime and empty inline file for help topics. # cli.cxx{repository-signing}: cli.options += --suppress-cli --suppress-inline + +# Include generated cli files into the distribution. +# +hxx{*-options}: dist = true +ixx{*-options}: dist = true +cxx{*-options}: dist = true diff --git a/build/bootstrap.build b/build/bootstrap.build index f26e50a..6ea7a32 100644 --- a/build/bootstrap.build +++ b/build/bootstrap.build @@ -3,11 +3,19 @@ # license : MIT; see accompanying LICENSE file project = bpkg +subprojects = # No subprojects. + +using build@0.4.0-a1 + version = 0.4.0-a1 +revision = 0 + +dist.package = $project-$version + +if ($revision != 0) + dist.package += +$revision -using build@0.3.0 using config using dist +using test using install - -dist.package = $project-$version diff --git a/build/root.build b/build/root.build index aa003a3..60d564f 100644 --- a/build/root.build +++ b/build/root.build @@ -13,6 +13,20 @@ cxx{*}: extension = cxx cxx.poptions =+ -I$out_root -I$src_root -# Don't install tests. +# Load the cli module but only if it's available. This way a distribution +# that includes pre-generated files can be built without installing cli. +# This is also the reason why above we explicitly spelled out individual +# source files instead of using the cli.cxx{} group (it won't be there +# unless the module is loaded). # -tests/: install = false +using? cli + +if! $cli.loaded +{ + define cli: file + cli{*}: extension = cli +} + +# All exe{} in tests/ are, well, tests. +# +tests/exe{*}: test = true diff --git a/buildfile b/buildfile index 86b0071..16b3e82 100644 --- a/buildfile +++ b/buildfile @@ -6,4 +6,7 @@ d = bpkg/ doc/ ./: $d doc{INSTALL LICENSE NEWS README version} file{manifest} include $d -doc{INSTALL*}: install = false +# Don't install tests or the INSTALL file. +# +dir{tests/}: install = false +doc{INSTALL}@./: install = false diff --git a/manifest b/manifest index 12b08d1..dd89d9c 100644 --- a/manifest +++ b/manifest @@ -8,8 +8,8 @@ description-file: README changes-file: NEWS url: https://build2.org email: users@build2.org -requires: c++11 -requires: build2 >= 0.3.0 +requires: c++14 +requires: build2 >= 0.4.0 # @@ Should probably become conditional dependency. requires: ? cli ; Only required if changing .cli files. depends: libbutl == 0.4.0-a1 diff --git a/tests/pkg/1/build2.org/common/hello/libhello-1.0.0+1.tar.gz b/tests/pkg/1/build2.org/common/hello/libhello-1.0.0+1.tar.gz index 3f1a59d..5850e44 100644 Binary files a/tests/pkg/1/build2.org/common/hello/libhello-1.0.0+1.tar.gz and b/tests/pkg/1/build2.org/common/hello/libhello-1.0.0+1.tar.gz differ diff --git a/tests/pkg/1/build2.org/common/libhello-1.0.0+1/build/root.build b/tests/pkg/1/build2.org/common/libhello-1.0.0+1/build/root.build index ebe16d5..d7f04c2 100644 --- a/tests/pkg/1/build2.org/common/libhello-1.0.0+1/build/root.build +++ b/tests/pkg/1/build2.org/common/libhello-1.0.0+1/build/root.build @@ -7,4 +7,4 @@ cxx.std = 11 # Don't install tests. # -tests/: install = false +dir{tests/}: install = false diff --git a/tests/test.sh b/tests/test.sh index 154177f..f6cd89a 100755 --- a/tests/test.sh +++ b/tests/test.sh @@ -321,7 +321,7 @@ url: http://www.example.org/libhello email: hello-users@example.org requires: c++11 location: libhello-1.0.0+1.tar.gz -sha256sum: ff68e5269b5f594996a016ba2789f646cf5753e8baa0e9b4b77c4c4b81c41326 +sha256sum: 1d8f7d987044c09bfb7a621f217cfc6530c3d0f0337eaf749f059a932c9fc1d7 EOF ## -- cgit v1.1