Package SCons :: Package Script :: Module Main :: Class BuildTask
[show private | hide private]
[frames | no frames]

Class BuildTask

Task --+
       |
      BuildTask


An SCons build task.


Method Summary
  display(self, message)
Hook to allow the calling interface to display a message.
  do_failed(self, status)
  execute(self)
Called to execute the task.
  executed(self)
Called when the task has been successfully executed and the Taskmaster instance wants to call the Node's callback methods.
  failed(self)
Default action when a task fails: stop the build.
  make_ready(self)
Make a task ready for execution
  postprocess(self)
Post-processes a task after it's been executed.
  prepare(self)
Called just before the task is executed.
    Inherited from Task
  __init__(self, tm, targets, top, node)
  exc_clear(self)
Clears any recorded exception.
  exc_info(self)
Returns info about a recorded exception.
  exception_set(self, exception)
Records an exception to be raised at the appropriate time.
  executed_with_callbacks(self)
Called when the task has been successfully executed and the Taskmaster instance wants to call the Node's callback methods.
  executed_without_callbacks(self)
Called when the task has been successfully executed and the Taskmaster instance doesn't want to call the Node's callback methods.
  fail_continue(self)
Explicit continue-the-build failure.
  fail_stop(self)
Explicit stop-the-build failure.
  get_target(self)
Fetch the target being built or updated by this task.
  make_ready_all(self)
Marks all targets in a task ready for execution.
  make_ready_current(self)
Marks all targets in a task ready for execution if any target is not current.
  _exception_raise(self)
Raises a pending exception that was recorded while getting a Task ready for execution.
  _no_exception_to_raise(self)

Class Variable Summary
Null progress = Null()

Method Details

display(self, message)

Hook to allow the calling interface to display a message.

This hook gets called as part of preparing a task for execution (that is, a Node to be built). As part of figuring out what Node should be built next, the actually target list may be altered, along with a message describing the alteration. The calling interface can subclass Task and provide a concrete implementation of this method to see those messages.

Overrides:
SCons.Taskmaster.Task.display (inherited documentation)

execute(self)

Called to execute the task.

This method is called from multiple threads in a parallel build, so only do thread safe stuff here. Do thread unsafe stuff in prepare(), executed() or failed().

Overrides:
SCons.Taskmaster.Task.execute (inherited documentation)

executed(self)

Called when the task has been successfully executed and the Taskmaster instance wants to call the Node's callback methods.

This may have been a do-nothing operation (to preserve build order), so we must check the node's state before deciding whether it was "built", in which case we call the appropriate Node method. In any event, we always call "visited()", which will handle any post-visit actions that must take place regardless of whether or not the target was an actual built target or a source Node.

Overrides:
SCons.Taskmaster.Task.executed_with_callbacks (inherited documentation)

failed(self)

Default action when a task fails: stop the build.

Overrides:
SCons.Taskmaster.Task.failed (inherited documentation)

make_ready(self)

Make a task ready for execution

Overrides:
SCons.Taskmaster.Task.make_ready_current

postprocess(self)

Post-processes a task after it's been executed.

This examines all the targets just built (or not, we don't care if the build was successful, or even if there was no build because everything was up-to-date) to see if they have any waiting parent Nodes, or Nodes waiting on a common side effect, that can be put back on the candidates list.

Overrides:
SCons.Taskmaster.Task.postprocess (inherited documentation)

prepare(self)

Called just before the task is executed.

This is mainly intended to give the target Nodes a chance to unlink underlying files and make all necessary directories before the Action is actually called to build the targets.

Overrides:
SCons.Taskmaster.Task.prepare (inherited documentation)

Class Variable Details

progress

Type:
Null
Value:
Null()                                                                 

Generated by Epydoc 2.1 on Wed Dec 12 09:39:31 2007 http://epydoc.sf.net