From 9ef9eafca42b882c13cc9b333cf49c5501ec385f Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Sat, 15 Jul 2017 15:28:00 +0300 Subject: Make use of wildcards in buildfiles --- buildfile | 4 ++++ cli/buildfile | 41 ++++------------------------------------- examples/buildfile | 4 +--- examples/features/buildfile | 2 +- examples/file/buildfile | 2 +- examples/hello/buildfile | 2 +- tests/buildfile | 4 +--- tests/ctor/buildfile | 2 +- tests/erase/buildfile | 2 +- tests/file/buildfile | 2 +- tests/inheritance/buildfile | 2 +- tests/specifier/buildfile | 2 +- unit-tests/buildfile | 7 ------- unit-tests/lexer/buildfile | 2 +- unit-tests/parser/buildfile | 2 +- 15 files changed, 20 insertions(+), 60 deletions(-) delete mode 100644 unit-tests/buildfile diff --git a/buildfile b/buildfile index f373af4..fc04248 100644 --- a/buildfile +++ b/buildfile @@ -14,6 +14,10 @@ d = cli/ unit-tests/ # Note that to make sure we don't pick up some system-installed cli, we # default (in bootstrap.build) to leaving the cli module unconfigured. # +# Also note that creating distribution with the cli module unconfigured, you +# will end up with incomplete distribution directory (without tests, examples +# and options.cli file). +# if $cli.configured d += tests/ examples/ diff --git a/cli/buildfile b/cli/buildfile index 248dcc6..48edffd 100644 --- a/cli/buildfile +++ b/cli/buildfile @@ -4,43 +4,10 @@ import libs = libcutl%lib{cutl} -exe{cli}: \ - { cxx}{ cli } \ - {hxx cxx}{ context } \ - {hxx cxx}{ generator } \ - {hxx cxx}{ header } \ - {hxx cxx}{ html } \ - {hxx cxx}{ inline } \ - {hxx ixx cxx}{ lexer } \ - {hxx cxx}{ man } \ - {hxx cxx}{ name-processor } \ - {hxx ixx cxx}{ options } \ - {hxx cxx}{ option-types } \ - {hxx cxx}{ parser } \ - {hxx cxx}{ runtime-header } \ - {hxx cxx}{ runtime-inline } \ - {hxx cxx}{ runtime-source } \ - {hxx }{ semantics } \ - {hxx cxx}{ source } \ - {hxx ixx }{ token } \ - {hxx }{ traversal } \ - {hxx cxx}{ txt } \ - {hxx }{ version } \ -semantics/{hxx cxx}{ class } \ -semantics/{hxx cxx}{ doc } \ -semantics/{hxx cxx}{ elements } \ -semantics/{hxx cxx}{ expression } \ -semantics/{hxx cxx}{ namespace } \ -semantics/{hxx cxx}{ option } \ -semantics/{hxx txx cxx}{ unit } \ -traversal/{hxx cxx}{ class } \ -traversal/{hxx }{ doc } \ -traversal/{hxx cxx}{ elements } \ -traversal/{hxx }{ expression } \ -traversal/{hxx cxx}{ namespace } \ -traversal/{hxx cxx}{ option } \ -traversal/{hxx cxx}{ unit } \ - $libs +exe{cli}: {hxx ixx txx cxx}{** -version -options} \ + {hxx}{version} \ + {hxx ixx cxx}{options} \ + $libs hxx{version}: in{version} $src_root/file{manifest} hxx{version}: dist = true diff --git a/examples/buildfile b/examples/buildfile index c64a34f..07ff2d7 100644 --- a/examples/buildfile +++ b/examples/buildfile @@ -2,6 +2,4 @@ # copyright : Copyright (c) 2009-2017 Code Synthesis Tools CC # license : MIT; see accompanying LICENSE file -d = features/ file/ hello/ -./: $d doc{README} -include $d +./: {*/ -build/} README diff --git a/examples/features/buildfile b/examples/features/buildfile index ea8feee..c8342e8 100644 --- a/examples/features/buildfile +++ b/examples/features/buildfile @@ -2,7 +2,7 @@ # copyright : Copyright (c) 2009-2017 Code Synthesis Tools CC # license : MIT; see accompanying LICENSE file -exe{driver}: cxx{driver} cli.cxx{options} doc{README} +exe{driver}: {hxx cxx}{* -options} cli.cxx{options} doc{README} cxx.poptions =+ "-I$out_base" diff --git a/examples/file/buildfile b/examples/file/buildfile index 7ae55df..3190cca 100644 --- a/examples/file/buildfile +++ b/examples/file/buildfile @@ -2,7 +2,7 @@ # copyright : Copyright (c) 2009-2017 Code Synthesis Tools CC # license : MIT; see accompanying LICENSE file -exe{driver}: cxx{driver} cli.cxx{options} doc{README} file{test.ops} +exe{driver}: {hxx cxx}{* -options} cli.cxx{options} doc{README} file{test.ops} exe{driver}: test.arguments = --options-file $src_base/test.ops cxx.poptions =+ "-I$out_base" diff --git a/examples/hello/buildfile b/examples/hello/buildfile index 9991aa9..c72b525 100644 --- a/examples/hello/buildfile +++ b/examples/hello/buildfile @@ -2,7 +2,7 @@ # copyright : Copyright (c) 2009-2017 Code Synthesis Tools CC # license : MIT; see accompanying LICENSE file -exe{driver}: cxx{driver} cli.cxx{hello} doc{README} +exe{driver}: {hxx cxx}{* -hello} cli.cxx{hello} doc{README} exe{driver}: test.arguments = --greeting Hi John Jane cxx.poptions =+ "-I$out_base" diff --git a/tests/buildfile b/tests/buildfile index 20d2e11..246bb7b 100644 --- a/tests/buildfile +++ b/tests/buildfile @@ -2,6 +2,4 @@ # copyright : Copyright (c) 2009-2017 Code Synthesis Tools CC # license : MIT; see accompanying LICENSE file -d = ctor/ erase/ file/ headings/ inheritance/ specifier/ toc/ -./: $d -include $d +./: {*/ -build/} diff --git a/tests/ctor/buildfile b/tests/ctor/buildfile index 68ea10e..4ba1f1e 100644 --- a/tests/ctor/buildfile +++ b/tests/ctor/buildfile @@ -2,7 +2,7 @@ # copyright : Copyright (c) 2009-2017 Code Synthesis Tools CC # license : MIT; see accompanying LICENSE file -exe{driver}: cxx{driver} cli.cxx{test} +exe{driver}: {hxx cxx}{* -test} cli.cxx{test} cxx.poptions =+ "-I$out_base" diff --git a/tests/erase/buildfile b/tests/erase/buildfile index fb58d5a..ec1cff6 100644 --- a/tests/erase/buildfile +++ b/tests/erase/buildfile @@ -2,7 +2,7 @@ # copyright : Copyright (c) 2009-2017 Code Synthesis Tools CC # license : MIT; see accompanying LICENSE file -exe{driver}: cxx{driver} cli.cxx{test} +exe{driver}: {hxx cxx}{* -test} cli.cxx{test} exe{driver}: test.arguments = foo -a bar -b 123 --arg -- -b 234 cxx.poptions =+ "-I$out_base" diff --git a/tests/file/buildfile b/tests/file/buildfile index 45ba0c6..9e5dfa0 100644 --- a/tests/file/buildfile +++ b/tests/file/buildfile @@ -2,7 +2,7 @@ # copyright : Copyright (c) 2009-2017 Code Synthesis Tools CC # license : MIT; see accompanying LICENSE file -exe{driver}: cxx{driver} cli.cxx{test} test{testscript} +exe{driver}: {hxx cxx}{* -test} cli.cxx{test} test{testscript} cxx.poptions =+ "-I$out_base" diff --git a/tests/inheritance/buildfile b/tests/inheritance/buildfile index baade2d..748be5a 100644 --- a/tests/inheritance/buildfile +++ b/tests/inheritance/buildfile @@ -2,7 +2,7 @@ # copyright : Copyright (c) 2009-2017 Code Synthesis Tools CC # license : MIT; see accompanying LICENSE file -exe{driver}: cxx{driver} cli.cxx{test} +exe{driver}: {hxx cxx}{* -test} cli.cxx{test} exe{driver}: test.arguments = --very-long-flag -s short -i 123 --string long exe{driver}: test.output = test.std diff --git a/tests/specifier/buildfile b/tests/specifier/buildfile index 364792c..d348550 100644 --- a/tests/specifier/buildfile +++ b/tests/specifier/buildfile @@ -2,7 +2,7 @@ # copyright : Copyright (c) 2009-2017 Code Synthesis Tools CC # license : MIT; see accompanying LICENSE file -exe{driver}: cxx{driver} cli.cxx{test} +exe{driver}: {hxx cxx}{* -test} cli.cxx{test} exe{driver}: test.arguments = -a -c foo cxx.poptions =+ "-I$out_base" diff --git a/unit-tests/buildfile b/unit-tests/buildfile deleted file mode 100644 index e24a071..0000000 --- a/unit-tests/buildfile +++ /dev/null @@ -1,7 +0,0 @@ -# file : unit-tests/buildfile -# copyright : Copyright (c) 2009-2017 Code Synthesis Tools CC -# license : MIT; see accompanying LICENSE file - -d = lexer/ parser/ -./: $d -include $d diff --git a/unit-tests/lexer/buildfile b/unit-tests/lexer/buildfile index 6e635bf..0b4fbcf 100644 --- a/unit-tests/lexer/buildfile +++ b/unit-tests/lexer/buildfile @@ -7,6 +7,6 @@ import libs = libcutl%lib{cutl} src = lexer -exe{driver}: cxx{driver} ../../cli/cxx{$src} $libs test{testscript} +exe{driver}: {hxx cxx}{*} ../../cli/cxx{$src} $libs test{testscript} include ../../cli/ diff --git a/unit-tests/parser/buildfile b/unit-tests/parser/buildfile index 8648de5..44020d8 100644 --- a/unit-tests/parser/buildfile +++ b/unit-tests/parser/buildfile @@ -9,6 +9,6 @@ src = lexer parser \ semantics/{class elements expression namespace option unit} \ traversal/{class elements namespace option unit} -exe{driver}: cxx{driver} ../../cli/cxx{$src} $libs test{testscript} +exe{driver}: {hxx cxx}{*} ../../cli/cxx{$src} $libs test{testscript} include ../../cli/ -- cgit v1.1