diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2017-07-29 10:54:31 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2017-07-29 10:54:31 +0200 |
commit | a69f728a710bcc4e17913a57ffb01da076467bfb (patch) | |
tree | b881854f9419975d87fdaf3b2f51db6492c97edf /bbot | |
parent | f179ab72a8c623383f68eac3e30635700d88dde9 (diff) |
Convert to use utility library
Diffstat (limited to 'bbot')
-rw-r--r-- | bbot/agent/agent.cxx | 2 | ||||
-rw-r--r-- | bbot/agent/machine.cxx | 3 | ||||
-rw-r--r-- | bbot/buildfile | 35 | ||||
-rw-r--r-- | bbot/machine-manifest.cxx (renamed from bbot/agent/machine-manifest.cxx) | 4 | ||||
-rw-r--r-- | bbot/machine-manifest.hxx (renamed from bbot/agent/machine-manifest.hxx) | 8 |
5 files changed, 27 insertions, 25 deletions
diff --git a/bbot/agent/agent.cxx b/bbot/agent/agent.cxx index 80b4fb7..c0849c6 100644 --- a/bbot/agent/agent.cxx +++ b/bbot/agent/agent.cxx @@ -30,11 +30,11 @@ #include <bbot/utility.hxx> #include <bbot/diagnostics.hxx> +#include <bbot/machine-manifest.hxx> #include <bbot/bootstrap-manifest.hxx> #include <bbot/agent/tftp.hxx> #include <bbot/agent/machine.hxx> -#include <bbot/agent/machine-manifest.hxx> using namespace std; using namespace butl; diff --git a/bbot/agent/machine.cxx b/bbot/agent/machine.cxx index 422c623..f3c9874 100644 --- a/bbot/agent/machine.cxx +++ b/bbot/agent/machine.cxx @@ -12,8 +12,9 @@ #include <cstdio> // snprintf() #include <cstring> // strcpy() +#include <bbot/machine-manifest.hxx> + #include <bbot/agent/agent.hxx> -#include <bbot/agent/machine-manifest.hxx> using namespace std; using namespace butl; diff --git a/bbot/buildfile b/bbot/buildfile index a576cce..60f120f 100644 --- a/bbot/buildfile +++ b/bbot/buildfile @@ -5,7 +5,7 @@ # 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 +# handle this properly would need to generate/pre-process it (and detect # update for install). # define service: file @@ -24,18 +24,19 @@ if ($cxx.target.class == "linux") { ./: exe{bbot-agent} service{'bbot-agent@'} - exe{bbot-agent}: {hxx ixx txx cxx}{* +agent/* -**-options -version} \ - {hxx ixx cxx}{common-options agent/agent-options} \ - {hxx}{version} \ - $libs + exe{bbot-agent}: agent/{hxx ixx txx cxx}{* -agent-options} \ + agent/{hxx ixx cxx}{agent-options} libu{bbot} } ./: exe{bbot-worker} -exe{bbot-worker}: {hxx ixx txx cxx}{* +worker/* -**-options -version} \ - {hxx ixx cxx}{common-options worker/worker-options} \ - {hxx}{version} \ - $libs +exe{bbot-worker}: worker/{hxx ixx txx cxx}{* -worker-options} \ + worker/{hxx ixx cxx}{worker-options} libu{bbot} + +libu{bbot}: bin.whole = false +libu{bbot}: {hxx ixx txx cxx}{* -common-options -version} \ + {hxx ixx cxx}{common-options} {hxx}{version} \ + $libs hxx{version}: in{version} $src_root/file{manifest} hxx{version}: dist = true @@ -45,26 +46,26 @@ hxx{version}: dist = true if $cli.configured { cli.cxx{common-options}: cli{common} - cli.cxx{agent/agent-options}: cli{agent/agent} - cli.cxx{worker/worker-options}: cli{worker/worker} + 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 <bbot/types-parsers.hxx>" \ --cli-namespace bbot::cli --generate-specifier --generate-parse - cli.cxx{common-options}: \ - cli.options += --include-prefix bbot --guard-prefix BBOT # 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 + agent/cli.cxx{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 + worker/cli.cxx{worker-options}: cli.options += --include-prefix bbot/worker \ +--guard-prefix BBOT_WORKER # Include generated cli files into the distribution. # diff --git a/bbot/agent/machine-manifest.cxx b/bbot/machine-manifest.cxx index 3312d1b..b7baf7e 100644 --- a/bbot/agent/machine-manifest.cxx +++ b/bbot/machine-manifest.cxx @@ -1,8 +1,8 @@ -// file : bbot/agent/machine-manifest.cxx -*- C++ -*- +// file : bbot/machine-manifest.cxx -*- C++ -*- // copyright : Copyright (c) 2014-2017 Code Synthesis Ltd // license : TBC; see accompanying LICENSE file -#include <bbot/agent/machine-manifest.hxx> +#include <bbot/machine-manifest.hxx> #include <sstream> diff --git a/bbot/agent/machine-manifest.hxx b/bbot/machine-manifest.hxx index 37919ba..efcdda4 100644 --- a/bbot/agent/machine-manifest.hxx +++ b/bbot/machine-manifest.hxx @@ -1,9 +1,9 @@ -// file : bbot/agent/machine-manifest.hxx -*- C++ -*- +// file : bbot/machine-manifest.hxx -*- C++ -*- // copyright : Copyright (c) 2014-2017 Code Synthesis Ltd // license : TBC; see accompanying LICENSE file -#ifndef BBOT_AGENT_MACHINE_MANIFEST_HXX -#define BBOT_AGENT_MACHINE_MANIFEST_HXX +#ifndef BBOT_MACHINE_MANIFEST_HXX +#define BBOT_MACHINE_MANIFEST_HXX #include <map> @@ -115,4 +115,4 @@ namespace bbot using bootstrapped_machine_manifests = vector<bootstrapped_machine_manifest>; } -#endif // BBOT_AGENT_MACHINE_MANIFEST_HXX +#endif // BBOT_MACHINE_MANIFEST_HXX |