# file : bbot/buildfile # copyright : Copyright (c) 2014-2019 Code Synthesis Ltd # license : TBC; see accompanying LICENSE file # Systemd .service file. # # @@ Currently the executable path is hardcoded as /usr/bin/bbot-agent. To # handle this properly would need to generate/pre-process it (and detect # update for install). # define service: file service{*}: extension = service service{*}: install = lib/systemd/system/ service{*}: install.mode = 644 import libs = libbutl%lib{butl} import libs += libbbot%lib{bbot} # Agent is a systemd service. # # @@ Have to package on Linux. # if ($cxx.target.class == "linux") { ./: exe{bbot-agent} service{'bbot-agent@'} exe{bbot-agent}: agent/{hxx ixx txx cxx}{* -agent-options} \ agent/{hxx ixx cxx}{agent-options} libue{bbot} } ./: exe{bbot-worker} exe{bbot-worker}: worker/{hxx ixx txx cxx}{* -worker-options} \ worker/{hxx ixx cxx}{worker-options} libue{bbot} libue{bbot}: bin.whole = false libue{bbot}: {hxx ixx txx cxx}{* -common-options -version} \ {hxx ixx cxx}{common-options} {hxx}{version} \ $libs hxx{version}: in{version} $src_root/manifest # Generated options parser. # if $cli.configured { cli.cxx{common-options}: cli{common} agent/cli.cxx{agent-options}: cli{agent/agent} worker/cli.cxx{worker-options}: cli{worker/worker} 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 += --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 agent/cli.cxx{agent-options}: cli.options += --include-prefix bbot/agent \ --guard-prefix BBOT_AGENT worker/cli.cxx{worker-options}: cli.options += --include-prefix bbot/worker \ --guard-prefix BBOT_WORKER # Include the generated cli files into the distribution and don't remove # them when cleaning in src (so that clean results in a state identical to # distributed). # cli.cxx{*}: dist = true cli.cxx{*}: clean = ($src_root != $out_root) }