When run with the --monitored
flag, abuild runs
in monitored mode. In this mode, abuild
generates output that would be useful to an external program that
may be monitoring its progress. This includes the output of
--dump-data
(see Appendix F, --dump-data
Format). With the data output in monitored
mode, it is possible to present information to the user that
reveals considerable detail about abuild's progress during the
course of a build. Monitored mode was introduced into abuild to
support development of graphical front ends or IDE plugins for
abuild, but it could be useful for other purposes as well.
All additional information in monitored mode is either prefixed by
the string abuild-monitored:
followed by a
keyword or is delimited on both ends by strings so prefixed. The
following information is provided in monitored mode:
Lines delimited by these keywords surround
--dump-data
output. In monitored mode,
--dump-data
output appears just before build
graph output or, if there were errors, just before it exits.
Note that --dump-data
output is always
included in monitored mode, so inclusion of the
--dump-data
option is not required and would
in fact make abuild exit before it built anything.
Lines delimited by these keywords surround
--dump-build-graph
output. In monitored mode,
--dump-build-graph
output appears just before
abuild begins a build. It is not included if there were
errors. Note that --dump-build-graph
output
is always included in monitored mode, so inclusion of the
--dump-build-graph
option is not required and
would in fact make abuild exit before it built anything.
Any error message output by abuild is repeated in a monitor output message prefixed by this keyword.
Any fatal error message output by abuild is first issued in a monitor output message prefixed by this keyword.
During a build, abuild outputs state changes from the dependency evaluator using this keyword. State change monitor output lines will always have this form:
abuild-monitor: state-change item-name platform state
where state
is one of the following:
waiting
The item is scheduled to be built but still has dependencies that have not yet been built
ready
The item is scheduled to be built, and all its dependencies have been successfully built
running
The item is currently being built
completed
The item has been built successfully
failed
An attempt was made to build the item, but the build failed
dependency-failed
The item was previously scheduled to be built, but a build will no longer be attempted because of the failure of one of its dependencies
Before abuild invokes the backend to perform a build, it will output a line of the form
abuild-monitor: targets item-name platform target [target ...]
to indicate a space-separated list of targets that will be passed to the backend.
Additional monitor output lines may be added in the future. To ensure forward compatibility, programs intending to consume abuild monitor output should ignore any abuild monitor output lines that they do not recognize.