Class: Rscons::BuildTarget

Inherits:
Object
  • Object
show all
Defined in:
lib/rscons/build_target.rb

Overview

The BuildTarget class represents a single build target.

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ BuildTarget

Create a BuildTarget object.

Options Hash (options):

  • :env (Environment)

    The Environment.

  • :target (String)

    The user-supplied target name.

  • :sources (Array<String>)

    The user-supplied source file name(s).


13
14
15
16
# File 'lib/rscons/build_target.rb', line 13

def initialize(options)
  @env = options[:env]
  @target = options[:target]
end

Instance Method Details

#depends(*user_deps) ⇒ void

This method returns an undefined value.

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


23
24
25
# File 'lib/rscons/build_target.rb', line 23

def depends(*user_deps)
  @env.depends(@target, *user_deps)
end

#to_sString

Convert the BuildTarget to a String.

This method always returns the target file name.


32
33
34
# File 'lib/rscons/build_target.rb', line 32

def to_s
  @target
end