class Rscons::BuildTarget

The BuildTarget class represents a single build target.

Public Class Methods

new(options) click to toggle source

Create a BuildTarget object.

@param options [Hash] Options to create the BuildTarget with. @option options [Environment] :env

The Environment.

@option options [String] :target

The user-supplied target name.

@option options [Array<String>] :sources

The user-supplied source file name(s).
# File lib/rscons/build_target.rb, line 13
def initialize(options)
  @env = options[:env]
  @target = options[:target]
end

Public Instance Methods

depends(*user_deps) click to toggle source

Manually record a given target as depending on the specified files.

@param user_deps [Array<String>] Dependency files.

@return [void]

# File lib/rscons/build_target.rb, line 23
def depends(*user_deps)
  @env.depends(@target, *user_deps)
end
to_s() click to toggle source

Convert the BuildTarget to a String.

This method always returns the target file name.

@return [String] Target file name.

# File lib/rscons/build_target.rb, line 32
def to_s
  @target
end