From 6deaa52d27ffd9e3ff2f78d7395526505c455416 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Wed, 12 Jul 2017 19:05:09 +0300 Subject: Make use of wildcards in buildfiles --- buildfile | 4 +-- libbutl/buildfile | 57 +++++-------------------------------- tests/base64/buildfile | 2 +- tests/cpfile/buildfile | 2 +- tests/curl/buildfile | 2 +- tests/dir-iterator/buildfile | 2 +- tests/fdstream/buildfile | 2 +- tests/link/buildfile | 2 +- tests/manifest-parser/buildfile | 2 +- tests/manifest-roundtrip/buildfile | 2 +- tests/manifest-serializer/buildfile | 2 +- tests/mventry/buildfile | 2 +- tests/openssl/buildfile | 2 +- tests/pager/buildfile | 2 +- tests/path-entry/buildfile | 2 +- tests/path/buildfile | 2 +- tests/prefix-map/buildfile | 2 +- tests/process-run/buildfile | 2 +- tests/process/buildfile | 2 +- tests/sendmail/buildfile | 2 +- tests/sha256/buildfile | 2 +- tests/small-vector/buildfile | 2 +- tests/standard-version/buildfile | 2 +- tests/strcase/buildfile | 2 +- tests/string-parser/buildfile | 2 +- tests/tab-parser/buildfile | 2 +- tests/target-triplet/buildfile | 2 +- tests/timestamp/buildfile | 2 +- tests/wildcard/buildfile | 2 +- 29 files changed, 36 insertions(+), 79 deletions(-) diff --git a/buildfile b/buildfile index 52756a3..75acfdb 100644 --- a/buildfile +++ b/buildfile @@ -2,12 +2,12 @@ # copyright : Copyright (c) 2014-2017 Code Synthesis Ltd # license : MIT; see accompanying LICENSE file -./: libbutl/ tests/ doc{INSTALL LICENSE NEWS README version} file{manifest} +./: {*/ -build/} doc{INSTALL LICENSE NEWS README version} file{manifest} doc{version}: file{manifest} # Generated by the version module. doc{version}: dist = true # Don't install tests or the INSTALL file. # -dir{tests/}: install = false +dir{tests/}: install = false doc{INSTALL}@./: install = false diff --git a/libbutl/buildfile b/libbutl/buildfile index 28cbc7b..c4b949d 100644 --- a/libbutl/buildfile +++ b/libbutl/buildfile @@ -2,63 +2,20 @@ # copyright : Copyright (c) 2014-2017 Code Synthesis Ltd # license : MIT; see accompanying LICENSE file -lib{butl}: \ - {hxx cxx}{ base64 } \ - {hxx ixx cxx}{ char-scanner } \ - {hxx }{ const-ptr } \ - {hxx ixx txx cxx}{ curl } \ - {hxx cxx}{ diagnostics } \ - {hxx }{ export } \ - {hxx ixx cxx}{ fdstream } \ - {hxx ixx cxx}{ filesystem } \ - {hxx }{ manifest-forward } \ - {hxx cxx}{ manifest-parser } \ - {hxx cxx}{ manifest-serializer } \ - {hxx }{ multi-index } \ - {hxx ixx txx cxx}{ openssl } \ - {hxx }{ optional } \ - {hxx cxx}{ pager } \ - {hxx ixx txx cxx}{ path } \ - {hxx }{ path-io } \ - {hxx }{ path-map } \ - {hxx txx }{ prefix-map } \ - {hxx ixx cxx}{ process } \ - {hxx }{ process-details } \ - {hxx }{ process-io } \ - { txx cxx}{ process-run } \ - {hxx txx cxx}{ regex } \ - {hxx ixx cxx}{ sendmail } \ - {hxx cxx}{ sha256 } \ - {hxx }{ small-vector } \ - {hxx ixx cxx}{ standard-version } \ - {hxx cxx}{ string-parser } \ - {hxx txx }{ string-table } \ - {hxx cxx}{ tab-parser } \ - {hxx cxx}{ target-triplet } \ - {hxx cxx}{ timestamp } \ - {hxx ixx cxx}{ utility } \ - {hxx }{ vector-view } \ - {hxx }{ version } \ -ft/{hxx }{ exception } \ -ft/{hxx }{ lang } \ -ft/{hxx }{ shared_mutex } +lib{butl}: {hxx ixx txx cxx}{** -win32-utility -version} {hxx}{version} # Exclude these from compilation on non-Windows targets. # if ($cxx.target.class == "windows") - lib{butl}: {hxx cxx}{ win32-utility } + lib{butl}: {hxx cxx}{win32-utility} else - lib{butl}: file{ win32-utility.hxx win32-utility.cxx } + lib{butl}: file{win32-utility.?xx} -# This one is included into sha256.cxx so treat it as file to exclude -# from the compilation. +# The C-files are included into sha256.cxx (sha256c.c) and timestamp.cxx +# (strptime.c timelocal.h timelocal.c), so treat them as files to exclude from +# the compilation. # -lib{butl}: file{sha256c.c} - -# These ones are included into timestamp.cxx so treat them as files to exclude -# from the compilation. -# -lib{butl}: file{strptime.c timelocal.h timelocal.c} +lib{butl}: file{*.c +*.h} hxx{version}: in{version} $src_root/file{manifest} hxx{version}: dist = true diff --git a/tests/base64/buildfile b/tests/base64/buildfile index bfa9c0e..31ee330 100644 --- a/tests/base64/buildfile +++ b/tests/base64/buildfile @@ -2,6 +2,6 @@ # copyright : Copyright (c) 2014-2017 Code Synthesis Ltd # license : MIT; see accompanying LICENSE file -exe{driver}: cxx{driver} ../../libbutl/lib{butl} +exe{driver}: cxx{*} ../../libbutl/lib{butl} include ../../libbutl/ diff --git a/tests/cpfile/buildfile b/tests/cpfile/buildfile index 30c237d..0237673 100644 --- a/tests/cpfile/buildfile +++ b/tests/cpfile/buildfile @@ -2,6 +2,6 @@ # copyright : Copyright (c) 2014-2017 Code Synthesis Ltd # license : MIT; see accompanying LICENSE file -exe{driver}: cxx{driver} ../../libbutl/lib{butl} +exe{driver}: cxx{*} ../../libbutl/lib{butl} include ../../libbutl/ diff --git a/tests/curl/buildfile b/tests/curl/buildfile index 698ff81..3351e8d 100644 --- a/tests/curl/buildfile +++ b/tests/curl/buildfile @@ -2,6 +2,6 @@ # copyright : Copyright (c) 2014-2017 Code Synthesis Ltd # license : MIT; see accompanying LICENSE file -exe{driver}: cxx{driver} ../../libbutl/lib{butl} test{testscript} +exe{driver}: cxx{*} ../../libbutl/lib{butl} test{testscript} include ../../libbutl/ diff --git a/tests/dir-iterator/buildfile b/tests/dir-iterator/buildfile index fcc1441..d6511b5 100644 --- a/tests/dir-iterator/buildfile +++ b/tests/dir-iterator/buildfile @@ -2,6 +2,6 @@ # copyright : Copyright (c) 2014-2017 Code Synthesis Ltd # license : MIT; see accompanying LICENSE file -exe{driver}: cxx{driver} ../../libbutl/lib{butl} test{testscript} +exe{driver}: cxx{*} ../../libbutl/lib{butl} test{testscript} include ../../libbutl/ diff --git a/tests/fdstream/buildfile b/tests/fdstream/buildfile index de23023..3df2edd 100644 --- a/tests/fdstream/buildfile +++ b/tests/fdstream/buildfile @@ -2,6 +2,6 @@ # copyright : Copyright (c) 2014-2017 Code Synthesis Ltd # license : MIT; see accompanying LICENSE file -exe{driver}: cxx{driver} ../../libbutl/lib{butl} +exe{driver}: cxx{*} ../../libbutl/lib{butl} include ../../libbutl/ diff --git a/tests/link/buildfile b/tests/link/buildfile index ad04cb0..e0dfda7 100644 --- a/tests/link/buildfile +++ b/tests/link/buildfile @@ -2,6 +2,6 @@ # copyright : Copyright (c) 2014-2017 Code Synthesis Ltd # license : MIT; see accompanying LICENSE file -exe{driver}: cxx{driver} ../../libbutl/lib{butl} +exe{driver}: cxx{*} ../../libbutl/lib{butl} include ../../libbutl/ diff --git a/tests/manifest-parser/buildfile b/tests/manifest-parser/buildfile index 0599fc1..b296f76 100644 --- a/tests/manifest-parser/buildfile +++ b/tests/manifest-parser/buildfile @@ -2,6 +2,6 @@ # copyright : Copyright (c) 2014-2017 Code Synthesis Ltd # license : MIT; see accompanying LICENSE file -exe{driver}: cxx{driver} ../../libbutl/lib{butl} +exe{driver}: cxx{*} ../../libbutl/lib{butl} include ../../libbutl/ diff --git a/tests/manifest-roundtrip/buildfile b/tests/manifest-roundtrip/buildfile index 71a3eb8..14a38c5 100644 --- a/tests/manifest-roundtrip/buildfile +++ b/tests/manifest-roundtrip/buildfile @@ -2,7 +2,7 @@ # copyright : Copyright (c) 2014-2017 Code Synthesis Ltd # license : MIT; see accompanying LICENSE file -exe{driver}: cxx{driver} ../../libbutl/lib{butl} +exe{driver}: cxx{*} ../../libbutl/lib{butl} exe{driver}: test.roundtrip = manifest include ../../libbutl/ diff --git a/tests/manifest-serializer/buildfile b/tests/manifest-serializer/buildfile index 19edcf8..b54363b 100644 --- a/tests/manifest-serializer/buildfile +++ b/tests/manifest-serializer/buildfile @@ -2,6 +2,6 @@ # copyright : Copyright (c) 2014-2017 Code Synthesis Ltd # license : MIT; see accompanying LICENSE file -exe{driver}: cxx{driver} ../../libbutl/lib{butl} +exe{driver}: cxx{*} ../../libbutl/lib{butl} include ../../libbutl/ diff --git a/tests/mventry/buildfile b/tests/mventry/buildfile index dfb4e15..e7e5f87 100644 --- a/tests/mventry/buildfile +++ b/tests/mventry/buildfile @@ -2,6 +2,6 @@ # copyright : Copyright (c) 2014-2017 Code Synthesis Ltd # license : MIT; see accompanying LICENSE file -exe{driver}: cxx{driver} ../../libbutl/lib{butl} test{testscript} +exe{driver}: cxx{*} ../../libbutl/lib{butl} test{testscript} include ../../libbutl/ diff --git a/tests/openssl/buildfile b/tests/openssl/buildfile index 3a3ab49..cf0eebb 100644 --- a/tests/openssl/buildfile +++ b/tests/openssl/buildfile @@ -2,6 +2,6 @@ # copyright : Copyright (c) 2014-2017 Code Synthesis Ltd # license : MIT; see accompanying LICENSE file -exe{driver}: cxx{driver} ../../libbutl/lib{butl} test{testscript} +exe{driver}: cxx{*} ../../libbutl/lib{butl} test{testscript} include ../../libbutl/ diff --git a/tests/pager/buildfile b/tests/pager/buildfile index 7da0aa0..df232e3 100644 --- a/tests/pager/buildfile +++ b/tests/pager/buildfile @@ -2,6 +2,6 @@ # copyright : Copyright (c) 2014-2017 Code Synthesis Ltd # license : MIT; see accompanying LICENSE file -exe{driver}: cxx{driver} ../../libbutl/lib{butl} +exe{driver}: cxx{*} ../../libbutl/lib{butl} include ../../libbutl/ diff --git a/tests/path-entry/buildfile b/tests/path-entry/buildfile index 2b5b0a1..e6605b6 100644 --- a/tests/path-entry/buildfile +++ b/tests/path-entry/buildfile @@ -2,6 +2,6 @@ # copyright : Copyright (c) 2014-2017 Code Synthesis Ltd # license : MIT; see accompanying LICENSE file -exe{driver}: cxx{driver} ../../libbutl/lib{butl} test{testscript} +exe{driver}: cxx{*} ../../libbutl/lib{butl} test{testscript} include ../../libbutl/ diff --git a/tests/path/buildfile b/tests/path/buildfile index 4f41a75..01a0272 100644 --- a/tests/path/buildfile +++ b/tests/path/buildfile @@ -2,6 +2,6 @@ # copyright : Copyright (c) 2014-2017 Code Synthesis Ltd # license : MIT; see accompanying LICENSE file -exe{driver}: cxx{driver} ../../libbutl/lib{butl} +exe{driver}: cxx{*} ../../libbutl/lib{butl} include ../../libbutl/ diff --git a/tests/prefix-map/buildfile b/tests/prefix-map/buildfile index 644b8eb..c015d4a 100644 --- a/tests/prefix-map/buildfile +++ b/tests/prefix-map/buildfile @@ -2,6 +2,6 @@ # copyright : Copyright (c) 2014-2017 Code Synthesis Ltd # license : MIT; see accompanying LICENSE file -exe{driver}: cxx{driver} ../../libbutl/lib{butl} +exe{driver}: cxx{*} ../../libbutl/lib{butl} include ../../libbutl/ diff --git a/tests/process-run/buildfile b/tests/process-run/buildfile index ce642f3..42987a6 100644 --- a/tests/process-run/buildfile +++ b/tests/process-run/buildfile @@ -2,6 +2,6 @@ # copyright : Copyright (c) 2014-2017 Code Synthesis Ltd # license : MIT; see accompanying LICENSE file -exe{driver}: cxx{driver} ../../libbutl/lib{butl} test{testscript} +exe{driver}: cxx{*} ../../libbutl/lib{butl} test{testscript} include ../../libbutl/ diff --git a/tests/process/buildfile b/tests/process/buildfile index 19f06a8..4157d96 100644 --- a/tests/process/buildfile +++ b/tests/process/buildfile @@ -2,6 +2,6 @@ # copyright : Copyright (c) 2014-2017 Code Synthesis Ltd # license : MIT; see accompanying LICENSE file -exe{driver}: cxx{driver} ../../libbutl/lib{butl} test{testscript} +exe{driver}: cxx{*} ../../libbutl/lib{butl} test{testscript} include ../../libbutl/ diff --git a/tests/sendmail/buildfile b/tests/sendmail/buildfile index 6ac2558..53ca23a 100644 --- a/tests/sendmail/buildfile +++ b/tests/sendmail/buildfile @@ -2,6 +2,6 @@ # copyright : Copyright (c) 2014-2017 Code Synthesis Ltd # license : MIT; see accompanying LICENSE file -exe{driver}: cxx{driver} ../../libbutl/lib{butl} test{testscript} +exe{driver}: cxx{*} ../../libbutl/lib{butl} test{testscript} include ../../libbutl/ diff --git a/tests/sha256/buildfile b/tests/sha256/buildfile index 0df7668..2ea2b20 100644 --- a/tests/sha256/buildfile +++ b/tests/sha256/buildfile @@ -2,6 +2,6 @@ # copyright : Copyright (c) 2014-2017 Code Synthesis Ltd # license : MIT; see accompanying LICENSE file -exe{driver}: cxx{driver} ../../libbutl/lib{butl} +exe{driver}: cxx{*} ../../libbutl/lib{butl} include ../../libbutl/ diff --git a/tests/small-vector/buildfile b/tests/small-vector/buildfile index 52285d8..147dbc8 100644 --- a/tests/small-vector/buildfile +++ b/tests/small-vector/buildfile @@ -2,6 +2,6 @@ # copyright : Copyright (c) 2014-2017 Code Synthesis Ltd # license : MIT; see accompanying LICENSE file -exe{driver}: cxx{driver} ../../libbutl/lib{butl} +exe{driver}: cxx{*} ../../libbutl/lib{butl} include ../../libbutl/ diff --git a/tests/standard-version/buildfile b/tests/standard-version/buildfile index a56ed4d..c0ce103 100644 --- a/tests/standard-version/buildfile +++ b/tests/standard-version/buildfile @@ -2,6 +2,6 @@ # copyright : Copyright (c) 2014-2017 Code Synthesis Ltd # license : MIT; see accompanying LICENSE file -exe{driver}: cxx{driver} ../../libbutl/lib{butl} test{testscript} +exe{driver}: cxx{*} ../../libbutl/lib{butl} test{testscript} include ../../libbutl/ diff --git a/tests/strcase/buildfile b/tests/strcase/buildfile index a9614f4..5628c3d 100644 --- a/tests/strcase/buildfile +++ b/tests/strcase/buildfile @@ -2,6 +2,6 @@ # copyright : Copyright (c) 2014-2017 Code Synthesis Ltd # license : MIT; see accompanying LICENSE file -exe{driver}: cxx{driver} ../../libbutl/lib{butl} +exe{driver}: cxx{*} ../../libbutl/lib{butl} include ../../libbutl/ diff --git a/tests/string-parser/buildfile b/tests/string-parser/buildfile index cc680cd..3c4d2e3 100644 --- a/tests/string-parser/buildfile +++ b/tests/string-parser/buildfile @@ -2,6 +2,6 @@ # copyright : Copyright (c) 2014-2017 Code Synthesis Ltd # license : MIT; see accompanying LICENSE file -exe{driver}: cxx{driver} ../../libbutl/lib{butl} test{testscript} +exe{driver}: cxx{*} ../../libbutl/lib{butl} test{testscript} include ../../libbutl/ diff --git a/tests/tab-parser/buildfile b/tests/tab-parser/buildfile index a56ed4d..c0ce103 100644 --- a/tests/tab-parser/buildfile +++ b/tests/tab-parser/buildfile @@ -2,6 +2,6 @@ # copyright : Copyright (c) 2014-2017 Code Synthesis Ltd # license : MIT; see accompanying LICENSE file -exe{driver}: cxx{driver} ../../libbutl/lib{butl} test{testscript} +exe{driver}: cxx{*} ../../libbutl/lib{butl} test{testscript} include ../../libbutl/ diff --git a/tests/target-triplet/buildfile b/tests/target-triplet/buildfile index 5796ca5..9466b09 100644 --- a/tests/target-triplet/buildfile +++ b/tests/target-triplet/buildfile @@ -2,6 +2,6 @@ # copyright : Copyright (c) 2014-2017 Code Synthesis Ltd # license : MIT; see accompanying LICENSE file -exe{driver}: cxx{driver} ../../libbutl/lib{butl} +exe{driver}: cxx{*} ../../libbutl/lib{butl} include ../../libbutl/ diff --git a/tests/timestamp/buildfile b/tests/timestamp/buildfile index d6d6865..ea2eb38 100644 --- a/tests/timestamp/buildfile +++ b/tests/timestamp/buildfile @@ -2,6 +2,6 @@ # copyright : Copyright (c) 2014-2017 Code Synthesis Ltd # license : MIT; see accompanying LICENSE file -exe{driver}: cxx{driver} ../../libbutl/lib{butl} +exe{driver}: cxx{*} ../../libbutl/lib{butl} include ../../libbutl/ diff --git a/tests/wildcard/buildfile b/tests/wildcard/buildfile index fcdd64b..adbdc94 100644 --- a/tests/wildcard/buildfile +++ b/tests/wildcard/buildfile @@ -2,6 +2,6 @@ # copyright : Copyright (c) 2014-2017 Code Synthesis Ltd # license : MIT; see accompanying LICENSE file -exe{driver}: cxx{driver} ../../libbutl/lib{butl} test{testscript} +exe{driver}: cxx{*} ../../libbutl/lib{butl} test{testscript} include ../../libbutl/ -- cgit v1.1