diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2017-07-10 18:20:08 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2017-07-12 12:27:33 +0300 |
commit | bfd63c8ec0e060c8c28bd3fc6acf9af4460bc208 (patch) | |
tree | a215028a9b0f47d8ab647786b217e7648d691535 | |
parent | fcc9a368646a2a71c26a5e2935d6595587857f67 (diff) |
Make use of wildcards in buildfiles
-rw-r--r-- | buildfile | 7 | ||||
-rw-r--r-- | clean/buildfile | 5 | ||||
-rw-r--r-- | doc/buildfile | 19 | ||||
-rw-r--r-- | etc/buildfile | 3 | ||||
-rw-r--r-- | libbrep/buildfile | 33 | ||||
-rw-r--r-- | load/buildfile | 9 | ||||
-rw-r--r-- | migrate/buildfile | 9 | ||||
-rw-r--r-- | mod/buildfile | 39 | ||||
-rw-r--r-- | tests/buildfile | 7 | ||||
-rw-r--r-- | tests/load/buildfile | 11 | ||||
-rw-r--r-- | tests/web/buildfile | 7 | ||||
-rw-r--r-- | tests/web/xhtml/buildfile | 7 | ||||
-rw-r--r-- | www/buildfile | 9 |
13 files changed, 52 insertions, 113 deletions
@@ -2,13 +2,14 @@ # copyright : Copyright (c) 2014-2017 Code Synthesis Ltd # license : MIT; see accompanying LICENSE file -./: libbrep/ mod/ clean/ load/ migrate/ tests/ www/ doc/ etc/ \ - doc{INSTALL INSTALL-DEV LICENSE NEWS README version} file{manifest} +./: {*/ -build/ -web/} \ + doc{LICENSE NEWS README INSTALL* version} \ + file{manifest} doc{version}: file{manifest} # Generated by the version module. doc{version}: dist = true # Don't install tests or the INSTALL* files. # -dir{tests/}: install = false +dir{tests/}: install = false doc{INSTALL*}: install = false diff --git a/clean/buildfile b/clean/buildfile index b4feada..761f063 100644 --- a/clean/buildfile +++ b/clean/buildfile @@ -9,8 +9,7 @@ import libs += libbbot%lib{bbot} include ../libbrep/ -exe{brep-clean}: {hxx ixx cxx}{* -clean-options} \ - {hxx ixx cxx}{clean-options} \ +exe{brep-clean}: {hxx ixx cxx}{* -clean-options} {hxx ixx cxx}{clean-options} \ ../libbrep/lib{brep} $libs # Generated options parser. @@ -26,5 +25,5 @@ if $cli.configured # Include generated cli files into the distribution. # - cli.cxx{clean-options}: dist = true + cli.cxx{*}: dist = true } diff --git a/doc/buildfile b/doc/buildfile index 278552f..81d9676 100644 --- a/doc/buildfile +++ b/doc/buildfile @@ -13,19 +13,12 @@ css{*}: extension = css define xhtml: doc xhtml{*}: extension = xhtml -./: {man1 xhtml}{$cmds} \ - css{common pre-box man} \ - file{man-prologue.1 man-epilogue.1 \ - man-prologue.xhtml man-epilogue.xhtml} +./: {man1 xhtml}{$cmds} \ + css{common pre-box man} \ + file{man-*} -./: doc{build2-repository-interface-manual.xhtml \ - build2-repository-interface-manual-a4.pdf \ - build2-repository-interface-manual-a4.ps \ - build2-repository-interface-manual-letter.pdf \ - build2-repository-interface-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-repository-interface-manual*} \ + css{code-box common doc pre-box toc} \ + file{manual.cli doc-* *.html2ps} ./: file{cli.sh} diff --git a/etc/buildfile b/etc/buildfile index 0c32e66..88a6b9e 100644 --- a/etc/buildfile +++ b/etc/buildfile @@ -2,8 +2,7 @@ # copyright : Copyright (c) 2014-2017 Code Synthesis Ltd # license : MIT; see accompanying LICENSE file -./: file{brep-module.conf brep-apache2.conf} \ -systemd/file{brep-load.service brep-load.timer} +./: file{** -buildfile} *: install = data/etc/ *: install.subdirs = true # Recreate subdirectories. diff --git a/libbrep/buildfile b/libbrep/buildfile index fd5e607..909e281 100644 --- a/libbrep/buildfile +++ b/libbrep/buildfile @@ -6,33 +6,24 @@ define sql: file sql{*}: extension = sql sql{*}: install = data/ +# @@ ODB: these are ODB changelogs that are both generated and stored in the +# repository (what if src != out?). Will need to think how to handle +# them properly (always generate in src_base?). +# +define xml: file +xml{*}: extension = xml + import int_libs = libodb%lib{odb} import int_libs += libodb-pgsql%lib{odb-pgsql} import int_libs += libbutl%lib{butl} import int_libs += libbpkg%lib{bpkg} import int_libs += libbbot%lib{bbot} -lib{brep}: \ -{hxx cxx}{ build } \ -{file }{ build.xml } \ -{hxx ixx cxx}{ build-odb } \ -{hxx }{ build-extra } \ -{hxx }{ build-package } \ -{hxx ixx cxx}{ build-package-odb } \ -{hxx cxx}{ common } \ -{hxx ixx cxx}{ common-odb } \ -{hxx cxx}{ package } \ -{file }{ package.xml } \ -{hxx ixx cxx}{ package-odb } \ -{hxx }{ package-extra } \ -{hxx cxx}{ package-traits } \ -{hxx cxx}{ database-lock } \ -{hxx }{ types } \ -{hxx }{ utility } \ -{hxx }{ version } \ -{hxx }{ wrapper-traits } \ - $int_libs \ -sql{build build-extra package package-extra} +lib{brep}: \ + {hxx ixx txx cxx}{* -version -*-odb} \ + {hxx }{version} \ + {hxx ixx cxx}{common-odb package-odb build-odb build-package-odb} \ + $int_libs xml{*} sql{*} hxx{version}: in{version} $src_root/file{manifest} hxx{version}: dist = true diff --git a/load/buildfile b/load/buildfile index e377a8e..6852871 100644 --- a/load/buildfile +++ b/load/buildfile @@ -9,11 +9,8 @@ import libs += libbpkg%lib{bpkg} include ../libbrep/ -exe{brep-load}: \ -{ cxx}{ load } \ -{hxx ixx cxx}{ load-options } \ -{hxx cxx}{ types-parsers } \ -../libbrep/lib{brep} $libs +exe{brep-load}: {hxx ixx cxx}{* -load-options} {hxx ixx cxx}{load-options} \ + ../libbrep/lib{brep} $libs # Generated options parser. # @@ -28,5 +25,5 @@ if $cli.configured # Include generated cli files into the distribution. # - cli.cxx{load-options}: dist = true + cli.cxx{*}: dist = true } diff --git a/migrate/buildfile b/migrate/buildfile index 0c8fc97..1115557 100644 --- a/migrate/buildfile +++ b/migrate/buildfile @@ -8,10 +8,9 @@ import libs += libbutl%lib{butl} include ../libbrep/ -exe{brep-migrate}: \ -{ cxx}{ migrate } \ -{hxx ixx cxx}{ migrate-options } \ -../libbrep/lib{brep} $libs +exe{brep-migrate}: {hxx ixx cxx}{* -migrate-options} \ + {hxx ixx cxx}{ migrate-options} \ + ../libbrep/lib{brep} $libs # Generated options parser. # @@ -25,5 +24,5 @@ if $cli.configured # Include generated cli files into the distribution. # - cli.cxx{migrate-options}: dist = true + cli.cxx{*}: dist = true } diff --git a/mod/buildfile b/mod/buildfile index 616302c..db403ec 100644 --- a/mod/buildfile +++ b/mod/buildfile @@ -18,36 +18,11 @@ import libs += libbbot%lib{bbot} include ../libbrep/ -mod{brep}: \ - {hxx cxx}{ build-config } \ - {hxx cxx}{ database } \ - {hxx cxx}{ database-module } \ - {hxx cxx}{ diagnostics } \ - {hxx cxx}{ mod-build-force } \ - {hxx cxx}{ mod-build-log } \ - {hxx cxx}{ mod-build-result } \ - {hxx cxx}{ mod-build-task } \ - {hxx cxx}{ mod-builds } \ - {hxx cxx}{ mod-package-details } \ - {hxx cxx}{ mod-package-search } \ - {hxx cxx}{ mod-package-version-details } \ - {hxx cxx}{ mod-repository-details } \ - {hxx cxx}{ mod-repository-root } \ - {hxx cxx}{ module } \ - {hxx ixx cxx}{ options } \ - {hxx }{ options-types } \ - {hxx cxx}{ page } \ - { cxx}{ services } \ - {hxx cxx}{ types-parsers } \ - ../web/{hxx cxx}{ mime-url-encoding } \ - ../web/{hxx }{ module } \ - ../web/{hxx }{ version } \ - ../web/{hxx }{ xhtml } \ - ../web/{hxx cxx}{ xhtml-fragment } \ -../web/apache/{hxx }{ log } \ -../web/apache/{hxx ixx cxx}{ request } \ -../web/apache/{hxx txx cxx}{ service } \ -../web/apache/{hxx }{ stream } \ +mod{brep}: {hxx ixx txx cxx}{* -options} \ + {hxx ixx cxx}{ options} \ + ../web/{hxx ixx txx cxx}{* -version} \ + ../web/{hxx }{ version} \ +../web/apache/{hxx ixx txx cxx}{* } \ ../libbrep/lib{brep} $libs ../web/hxx{version}: ../web/in{version} $src_root/file{manifest} @@ -55,7 +30,7 @@ mod{brep}: \ # Don't install any of the module's headers. # -{hxx ixx txx}{*}: install = false + {hxx ixx txx}{*}: install = false ../web/{hxx ixx txx}{*}: install = false # Generated options parser. @@ -75,5 +50,5 @@ if $cli.configured # Include generated cli files into the distribution. # - cli.cxx{options}: dist = true + cli.cxx{*}: dist = true } diff --git a/tests/buildfile b/tests/buildfile deleted file mode 100644 index 3c57ff9..0000000 --- a/tests/buildfile +++ /dev/null @@ -1,7 +0,0 @@ -# file : tests/buildfile -# copyright : Copyright (c) 2014-2017 Code Synthesis Ltd -# license : MIT; see accompanying LICENSE file - -d = load/ web/ -./: $d -include $d diff --git a/tests/load/buildfile b/tests/load/buildfile index 6b81346..9338f32 100644 --- a/tests/load/buildfile +++ b/tests/load/buildfile @@ -9,13 +9,14 @@ import libs += libodb%lib{odb} include ../../libbrep/ -exe{driver}: cxx{driver} ../../libbrep/lib{brep} $libs +./: exe{driver} file{loadtab cert *.pem openssl.cnf */**} -# Disable for now until build2 test module supports running custom -# commands, pre/post steps. +exe{driver}: cxx{*} ../../libbrep/lib{brep} $libs + +# Disable until testscript is implemented. # exe{driver}: test = false -# precondition: PostgreSQL server running port 8432 with brep schema created. +# precondition: the environment is setup according to INSTALL-DEV file. # test: -# ./driver ../../load/brep-load --db-host localhost --db-port 8432 ./loadtab +# ./driver ../../load/brep-load --bpkg ../../../bpkg/bpkg/bpkg ./loadtab diff --git a/tests/web/buildfile b/tests/web/buildfile deleted file mode 100644 index 76e8a80..0000000 --- a/tests/web/buildfile +++ /dev/null @@ -1,7 +0,0 @@ -# file : tests/web/buildfile -# copyright : Copyright (c) 2014-2017 Code Synthesis Ltd -# license : MIT; see accompanying LICENSE file - -d = xhtml/ -./: $d -include $d diff --git a/tests/web/xhtml/buildfile b/tests/web/xhtml/buildfile index 8822869..bdfd7d6 100644 --- a/tests/web/xhtml/buildfile +++ b/tests/web/xhtml/buildfile @@ -4,5 +4,10 @@ import libs = libstudxml%lib{studxml} -exe{driver}: cxx{driver} $libs +exe{driver}: cxx{*} $libs exe{driver}: test.output = test.out + +# @@ The rule doesn't trigger the target generating. Will be fixed when we add +# support for utility library. +# +../../../web/hxx{version}: ../../../web/in{version} $src_root/file{manifest} diff --git a/www/buildfile b/www/buildfile index a9616b0..510c363 100644 --- a/www/buildfile +++ b/www/buildfile @@ -10,11 +10,4 @@ define scss: file scss{*}: extension = scss scss{*}: install = data/www/ -./: css{common brep-common \ - builds builds-body \ - package-details package-details-body \ - package-search package-search-body \ - package-version-details package-version-details-body \ - repository-details repository-details-body} \ - scss{builds package-details package-search package-version-details \ - repository-details} +./: css{*} scss{*} |