4.4.2.3 Custom Builder Constructor

It is optional for a custom builder to provide an initialize method. If an initialize method is provided, it must call super to invoke the base Rscons::Builder class's constructor. A single Hash parameter is passed to the builder constructor. This Hash contains many parameters describing how the build target was registered by the user. The base constructor will set several instance attributes within the builder:

  • @target will contain the path to the build target
  • @sources will contain the path(s) to the build source(s)
  • @cache will contain a reference to the Rscons::Cache object used for the build
  • @env will contain a reference to the Environment object that registered the build target using the builder
  • @vars will contain any user-specified construction variable values that should be used for the build operation (overriding any Environment-wide construction variable values)