From c8ace1ee0a6cab5fd4ea2f084ea436cfa513637d Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Thu, 13 Jul 2017 22:50:15 +0300 Subject: Make use of wildcards in buildfiles --- bbot/buildfile | 50 +++++++++++++++++++++----------------------------- 1 file changed, 21 insertions(+), 29 deletions(-) (limited to 'bbot/buildfile') diff --git a/bbot/buildfile b/bbot/buildfile index 15ab966..a576cce 100644 --- a/bbot/buildfile +++ b/bbot/buildfile @@ -13,7 +13,7 @@ service{*}: extension = service service{*}: install = lib/systemd/system/ service{*}: install.mode = 644 -import libs = libbutl%lib{butl} +import libs = libbutl%lib{butl} import libs += libbbot%lib{bbot} # Agent is a systemd service. @@ -24,33 +24,18 @@ if ($cxx.target.class == "linux") { ./: exe{bbot-agent} service{'bbot-agent@'} - exe{bbot-agent}: \ - {hxx cxx}{ agent } {hxx ixx cxx}{ agent-options } \ - {hxx ixx cxx}{ common-options } \ - {hxx cxx}{ bootstrap-manifest } \ - {hxx cxx}{ diagnostics } \ - {hxx cxx}{ machine-manifest } \ - {hxx cxx}{ machine } \ - {hxx cxx}{ tftp } \ - {hxx }{ types } \ - {hxx cxx}{ types-parsers } \ - {hxx txx }{ utility } \ - {hxx }{ version } \ - $libs + exe{bbot-agent}: {hxx ixx txx cxx}{* +agent/* -**-options -version} \ + {hxx ixx cxx}{common-options agent/agent-options} \ + {hxx}{version} \ + $libs } ./: exe{bbot-worker} -exe{bbot-worker}: \ -{ cxx}{ worker } {hxx ixx cxx}{ worker-options } \ - {hxx ixx cxx}{ common-options } \ -{hxx cxx}{ bootstrap-manifest } \ -{hxx cxx}{ diagnostics } \ -{hxx }{ types } \ -{hxx cxx}{ types-parsers } \ -{hxx txx }{ utility } \ -{hxx }{ version } \ - $libs +exe{bbot-worker}: {hxx ixx txx cxx}{* +worker/* -**-options -version} \ + {hxx ixx cxx}{common-options worker/worker-options} \ + {hxx}{version} \ + $libs hxx{version}: in{version} $src_root/file{manifest} hxx{version}: dist = true @@ -60,20 +45,27 @@ hxx{version}: dist = true if $cli.configured { cli.cxx{common-options}: cli{common} - cli.cxx{agent-options}: cli{agent} - cli.cxx{worker-options}: cli{worker} + cli.cxx{agent/agent-options}: cli{agent/agent} + cli.cxx{worker/worker-options}: cli{worker/worker} - cli.options += -I $src_root --include-with-brackets --include-prefix bbot \ ---guard-prefix BBOT --cxx-prologue "#include " \ + cli.options += -I $src_root --include-with-brackets \ +--cxx-prologue "#include " \ --cli-namespace bbot::cli --generate-specifier --generate-parse - cli.cxx{common-options}: cli.options = $cli.options # No usage. + cli.cxx{common-options}: \ + cli.options += --include-prefix bbot --guard-prefix BBOT # No usage. # Usage options. # cli.options += --suppress-undocumented --long-usage --ansi-color \ --page-usage 'bbot::print_$name$_' --option-length 23 + cli.cxx{agent/agent-options}: \ + cli.options += --include-prefix bbot/agent --guard-prefix BBOT_AGENT + + cli.cxx{worker/worker-options}: \ + cli.options += --include-prefix bbot/worker --guard-prefix BBOT_WORKER + # Include generated cli files into the distribution. # cli.cxx{*}: dist = true -- cgit v1.1