aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2017-07-12 14:09:36 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2017-07-12 14:55:45 +0300
commitae0205a089b02a38acf5beae9fa75664040fc27a (patch)
treee128a32083a5fe4f10512e27022b4e1c615b4759
parent7a141264e858c98053367910c6300c79de7bdb98 (diff)
Make use of wildcards in buildfiles
-rw-r--r--build2/buildfile108
-rw-r--r--buildfile7
-rw-r--r--doc/buildfile19
-rw-r--r--tests/buildfile1
-rw-r--r--tests/directive/buildfile2
-rw-r--r--tests/eval/buildfile2
-rw-r--r--tests/expansion/buildfile2
-rw-r--r--tests/name/buildfile2
-rw-r--r--tests/test/config-test/buildfile2
-rw-r--r--tests/test/script/runner/buildfile2
-rw-r--r--tests/value/buildfile2
-rw-r--r--unit-tests/cc/lexer/buildfile4
-rw-r--r--unit-tests/cc/parser/buildfile4
-rw-r--r--unit-tests/function/buildfile2
-rw-r--r--unit-tests/lexer/buildfile3
-rw-r--r--unit-tests/scheduler/buildfile2
-rw-r--r--unit-tests/test/script/lexer/buildfile6
-rw-r--r--unit-tests/test/script/parser/buildfile7
-rw-r--r--unit-tests/test/script/regex/buildfile3
19 files changed, 32 insertions, 148 deletions
diff --git a/build2/buildfile b/build2/buildfile
index d2aa7c1..fc0632c 100644
--- a/build2/buildfile
+++ b/build2/buildfile
@@ -4,118 +4,16 @@
import libs = libbutl%lib{butl}
-exe{b}: \
- {hxx ixx cxx}{ algorithm } \
- { cxx}{ b } \
- {hxx ixx cxx}{ b-options } \
- {hxx ixx cxx}{ context } \
- {hxx cxx}{ depdb } \
- {hxx cxx}{ diagnostics } \
- {hxx cxx}{ dump } \
- {hxx ixx cxx}{ file } \
- {hxx txx cxx}{ filesystem } \
- {hxx cxx}{ function } \
- { cxx}{ functions-builtin } \
- { cxx}{ functions-filesystem } \
- { cxx}{ functions-path } \
- { cxx}{ functions-process-path } \
- { cxx}{ functions-regex } \
- { cxx}{ functions-string } \
- { cxx}{ functions-target-triplet } \
- {hxx cxx}{ lexer } \
- {hxx cxx}{ module } \
- {hxx ixx cxx}{ name } \
- {hxx cxx}{ operation } \
- {hxx cxx}{ parser } \
- {hxx cxx}{ prerequisite } \
- {hxx cxx}{ rule } \
- {hxx }{ rule-map } \
- {hxx txx cxx}{ scheduler } \
- {hxx ixx cxx}{ scope } \
- {hxx cxx}{ search } \
- {hxx cxx}{ spec } \
- {hxx ixx txx cxx}{ target } \
- {hxx }{ target-key } \
- {hxx }{ target-type } \
- {hxx cxx}{ token } \
- {hxx }{ types } \
- {hxx cxx}{ types-parsers } \
- {hxx ixx txx cxx}{ utility } \
- {hxx ixx txx cxx}{ variable } \
- {hxx }{ version } \
- bin/{hxx cxx}{ guess } \
- bin/{hxx cxx}{ init } \
- bin/{hxx cxx}{ rule } \
- bin/{hxx cxx}{ target } \
- c/{hxx cxx}{ init } \
- c/{hxx }{ target } \
- cc/{hxx cxx}{ common } \
- cc/{hxx cxx}{ compile } \
- cc/{ cxx}{ gcc } \
- cc/{hxx cxx}{ guess } \
- cc/{hxx cxx}{ init } \
- cc/{hxx cxx}{ install } \
- cc/{hxx cxx}{ lexer } \
- cc/{hxx cxx}{ link } \
- cc/{hxx cxx}{ module } \
- cc/{ cxx}{ msvc } \
- cc/{hxx cxx}{ parser } \
- cc/{ cxx}{ pkgconfig } \
- cc/{hxx cxx}{ target } \
- cc/{hxx }{ types } \
- cc/{hxx ixx cxx}{ utility } \
- cc/{ cxx}{ windows-manifest } \
- cc/{ cxx}{ windows-rpath } \
- cli/{hxx cxx}{ init } \
- cli/{hxx cxx}{ rule } \
- cli/{hxx cxx}{ target } \
- config/{hxx cxx}{ init } \
- config/{hxx cxx}{ module } \
- config/{hxx cxx}{ operation } \
- config/{hxx txx cxx}{ utility } \
- cxx/{hxx cxx}{ init } \
- cxx/{hxx cxx}{ target } \
- dist/{hxx cxx}{ init } \
- dist/{hxx cxx}{ module } \
- dist/{hxx cxx}{ operation } \
- dist/{hxx cxx}{ rule } \
- pkgconfig/{hxx cxx}{ init } \
- install/{hxx cxx}{ init } \
- install/{hxx cxx}{ operation } \
- install/{hxx cxx}{ rule } \
- install/{hxx }{ utility } \
- test/{hxx cxx}{ common } \
- test/{hxx cxx}{ init } \
- test/{hxx }{ module } \
- test/{hxx cxx}{ operation } \
- test/{hxx cxx}{ rule } \
- test/{hxx cxx}{ target } \
-test/script/{hxx cxx}{ builtin } \
-test/script/{hxx cxx}{ lexer } \
-test/script/{hxx cxx}{ parser } \
-test/script/{hxx ixx cxx}{ regex } \
-test/script/{hxx cxx}{ runner } \
-test/script/{hxx ixx cxx}{ script } \
-test/script/{hxx cxx}{ token } \
- version/{hxx cxx}{ init } \
- version/{hxx cxx}{ module } \
- version/{hxx cxx}{ rule } \
- version/{hxx cxx}{ snapshot } \
- version/{ cxx}{ snapshot-git } \
- liba{b} $libs
-
-#\
-exe{b}: {hxx ixx txx cxx}{** -b-options -dummy} \
- {hxx ixx cxx}{b-options} \
+exe{b}: {hxx ixx txx cxx}{** -b-options -version -dummy} \
+ {hxx ixx cxx}{b-options} {hxx}{version} \
liba{b} $libs
-#\
hxx{version}: in{version} $src_root/file{manifest}
hxx{version}: dist = true
# Fake utility library (without it code generation does not work).
#
-liba{b}: {cxx}{ dummy }
+liba{b}: {cxx}{dummy}
liba{b}: cxx.export.poptions = "-I$out_root" "-I$src_root"
liba{b}: install = false
diff --git a/buildfile b/buildfile
index 7f3441e..7a9ce81 100644
--- a/buildfile
+++ b/buildfile
@@ -2,10 +2,9 @@
# copyright : Copyright (c) 2014-2017 Code Synthesis Ltd
# license : MIT; see accompanying LICENSE file
-./: build2/ tests/ unit-tests/ doc/ \
- doc{INSTALL LICENSE NEWS README version} \
- file{bootstrap.sh bootstrap-msvc.bat bootstrap-mingw.bat} \
- file{INSTALL.cli config.guess config.sub manifest}
+./: {*/ -build/ -config/ -old-tests/} \
+ doc{INSTALL LICENSE NEWS README version} \
+ file{INSTALL.cli bootstrap* config.* manifest}
doc{version}: file{manifest} # Generated by the version module.
doc{version}: dist = true
diff --git a/doc/buildfile b/doc/buildfile
index 1241870..cf7a1fb 100644
--- a/doc/buildfile
+++ b/doc/buildfile
@@ -8,19 +8,12 @@ css{*}: extension = css
define xhtml: doc
xhtml{*}: extension = xhtml
-./: {man1 xhtml}{b} \
- css{common pre-box man} \
- file{man-prologue.1 man-epilogue.1 \
- man-prologue.xhtml man-epilogue.xhtml}
+./: {man1 xhtml}{b} \
+ css{common pre-box man} \
+ file{man-*}
-./: doc{build2-build-system-manual.xhtml \
- build2-build-system-manual-a4.pdf \
- build2-build-system-manual-a4.ps \
- build2-build-system-manual-letter.pdf \
- build2-build-system-manual-letter.ps} \
- css{code-box common doc pre-box toc} \
- file{a4.html2ps letter.html2ps doc.html2ps} \
- file{doc-prologue.xhtml doc-epilogue.xhtml \
- manual.cli}
+./: doc{build2-build-system-manual*} \
+ css{code-box common doc pre-box toc} \
+ file{manual.cli doc-* *.html2ps}
./: file{cli.sh}
diff --git a/tests/buildfile b/tests/buildfile
index 0d21f72..a968862 100644
--- a/tests/buildfile
+++ b/tests/buildfile
@@ -3,4 +3,3 @@
# license : MIT; see accompanying LICENSE file
./: {*/ -build/} file{common.test}
-
diff --git a/tests/directive/buildfile b/tests/directive/buildfile
index 27ef3ff..920faad 100644
--- a/tests/directive/buildfile
+++ b/tests/directive/buildfile
@@ -2,4 +2,4 @@
# copyright : Copyright (c) 2014-2017 Code Synthesis Ltd
# license : MIT; see accompanying LICENSE file
-./: test{assert} $b
+./: test{*} $b
diff --git a/tests/eval/buildfile b/tests/eval/buildfile
index 3c8a3ba..d7569aa 100644
--- a/tests/eval/buildfile
+++ b/tests/eval/buildfile
@@ -2,4 +2,4 @@
# copyright : Copyright (c) 2014-2017 Code Synthesis Ltd
# license : MIT; see accompanying LICENSE file
-./: test{comma comp or-and qual ternary value} $b
+./: test{*} $b
diff --git a/tests/expansion/buildfile b/tests/expansion/buildfile
index 94d3c94..57a7544 100644
--- a/tests/expansion/buildfile
+++ b/tests/expansion/buildfile
@@ -2,4 +2,4 @@
# copyright : Copyright (c) 2014-2017 Code Synthesis Ltd
# license : MIT; see accompanying LICENSE file
-./: test{type} $b
+./: test{*} $b
diff --git a/tests/name/buildfile b/tests/name/buildfile
index 5b368bb..dc949f0 100644
--- a/tests/name/buildfile
+++ b/tests/name/buildfile
@@ -2,4 +2,4 @@
# copyright : Copyright (c) 2014-2017 Code Synthesis Ltd
# license : MIT; see accompanying LICENSE file
-./: test{cross pattern} $b
+./: test{*} $b
diff --git a/tests/test/config-test/buildfile b/tests/test/config-test/buildfile
index cca33fa..83d18da 100644
--- a/tests/test/config-test/buildfile
+++ b/tests/test/config-test/buildfile
@@ -7,4 +7,4 @@
./: test{testscript} exe{driver} $b
-exe{driver}: cxx{driver}
+exe{driver}: cxx{*}
diff --git a/tests/test/script/runner/buildfile b/tests/test/script/runner/buildfile
index 3970cfd..b54852e 100644
--- a/tests/test/script/runner/buildfile
+++ b/tests/test/script/runner/buildfile
@@ -7,4 +7,4 @@
test{*}: target = exe{driver}
import libs = libbutl%lib{butl}
-exe{driver}: cxx{driver} $libs
+exe{driver}: cxx{*} $libs
diff --git a/tests/value/buildfile b/tests/value/buildfile
index ae54752..ce246a4 100644
--- a/tests/value/buildfile
+++ b/tests/value/buildfile
@@ -2,4 +2,4 @@
# copyright : Copyright (c) 2014-2017 Code Synthesis Ltd
# license : MIT; see accompanying LICENSE file
-./: test{reverse}
+./: test{*}
diff --git a/unit-tests/cc/lexer/buildfile b/unit-tests/cc/lexer/buildfile
index 53adc33..b2d8e85 100644
--- a/unit-tests/cc/lexer/buildfile
+++ b/unit-tests/cc/lexer/buildfile
@@ -12,7 +12,7 @@ functions-process-path functions-regex functions-string \
functions-target-triplet algorithm search dump filesystem scheduler \
config/{utility init operation module} spec
-exe{driver}: cxx{driver} ../../../build2/cxx{$src} ../../../build2/liba{b} \
-$libs test{*}
+exe{driver}: cxx{*} ../../../build2/cxx{$src} ../../../build2/liba{b} \
+ $libs test{*}
include ../../../build2/
diff --git a/unit-tests/cc/parser/buildfile b/unit-tests/cc/parser/buildfile
index 59ef4fa..7f46ba0 100644
--- a/unit-tests/cc/parser/buildfile
+++ b/unit-tests/cc/parser/buildfile
@@ -12,7 +12,7 @@ functions-path functions-process-path functions-regex functions-string \
functions-target-triplet algorithm search dump filesystem scheduler \
config/{utility init operation module} spec
-exe{driver}: cxx{driver} ../../../build2/cxx{$src} ../../../build2/liba{b} \
-$libs test{*}
+exe{driver}: cxx{*} ../../../build2/cxx{$src} ../../../build2/liba{b} \
+ $libs test{*}
include ../../../build2/
diff --git a/unit-tests/function/buildfile b/unit-tests/function/buildfile
index ad29ac7..94c89b1 100644
--- a/unit-tests/function/buildfile
+++ b/unit-tests/function/buildfile
@@ -11,6 +11,6 @@ functions-builtin functions-filesystem functions-path functions-process-path \
functions-regex functions-string functions-target-triplet algorithm search \
dump filesystem scheduler config/{utility init operation module} spec
-exe{driver}: cxx{driver} ../../build2/cxx{$src} ../../build2/liba{b} $libs test{call syntax}
+exe{driver}: cxx{*} ../../build2/cxx{$src} ../../build2/liba{b} $libs test{*}
include ../../build2/
diff --git a/unit-tests/lexer/buildfile b/unit-tests/lexer/buildfile
index 0ab50de..e061fd7 100644
--- a/unit-tests/lexer/buildfile
+++ b/unit-tests/lexer/buildfile
@@ -11,7 +11,6 @@ functions-builtin functions-filesystem functions-path functions-process-path \
functions-regex functions-string functions-target-triplet algorithm search \
dump filesystem scheduler config/{utility init operation module} spec
-exe{driver}: cxx{driver} ../../build2/cxx{$src} ../../build2/liba{b} $libs \
-test{*}
+exe{driver}: cxx{*} ../../build2/cxx{$src} ../../build2/liba{b} $libs test{*}
include ../../build2/
diff --git a/unit-tests/scheduler/buildfile b/unit-tests/scheduler/buildfile
index b3b97ce..18404af 100644
--- a/unit-tests/scheduler/buildfile
+++ b/unit-tests/scheduler/buildfile
@@ -11,6 +11,6 @@ functions-builtin functions-filesystem functions-path functions-process-path \
functions-regex functions-string functions-target-triplet algorithm search \
dump filesystem scheduler config/{utility init operation module} spec
-exe{driver}: cxx{driver} ../../build2/cxx{$src} ../../build2/liba{b} $libs
+exe{driver}: cxx{*} ../../build2/cxx{$src} ../../build2/liba{b} $libs
include ../../build2/
diff --git a/unit-tests/test/script/lexer/buildfile b/unit-tests/test/script/lexer/buildfile
index a21df7a..efc5a9c 100644
--- a/unit-tests/test/script/lexer/buildfile
+++ b/unit-tests/test/script/lexer/buildfile
@@ -12,9 +12,7 @@ functions-regex functions-string functions-target-triplet algorithm search \
dump filesystem scheduler config/{utility init operation module} \
test/script/{token lexer} spec
-exe{driver}: cxx{driver} ../../../../build2/cxx{$src} \
-../../../../build2/liba{b} $libs \
-test{command-line first-token second-token command-expansion variable-line \
- description-line variable}
+exe{driver}: cxx{*} ../../../../build2/cxx{$src} ../../../../build2/liba{b} \
+ $libs test{*}
include ../../../../build2/
diff --git a/unit-tests/test/script/parser/buildfile b/unit-tests/test/script/parser/buildfile
index 184fd82..e0d74df 100644
--- a/unit-tests/test/script/parser/buildfile
+++ b/unit-tests/test/script/parser/buildfile
@@ -13,10 +13,7 @@ functions-target-triplet config/{utility init operation module} dump \
types-parsers test/{target script/{token lexer parser regex script}} \
scheduler spec
-exe{driver}: cxx{driver} ../../../../build2/cxx{$src} \
-../../../../build2/liba{b} $libs \
-test{cleanup command-if command-re-parse description directive exit \
- expansion here-document here-string include pipe-expr pre-parse \
- redirect regex scope scope-if setup-teardown}
+exe{driver}: cxx{*} ../../../../build2/cxx{$src} ../../../../build2/liba{b} \
+ $libs test{*}
include ../../../../build2/
diff --git a/unit-tests/test/script/regex/buildfile b/unit-tests/test/script/regex/buildfile
index 89f1bc5..df0bf28 100644
--- a/unit-tests/test/script/regex/buildfile
+++ b/unit-tests/test/script/regex/buildfile
@@ -7,6 +7,7 @@
import libs = libbutl%lib{butl}
src = test/script/regex
-exe{driver}: cxx{driver} ../../../../build2/cxx{$src} ../../../../build2/liba{b} $libs
+exe{driver}: cxx{*} ../../../../build2/cxx{$src} ../../../../build2/liba{b} \
+ $libs
include ../../../../build2/