Class: PhonyTarget
- Inherits:
-
Object
- Object
- PhonyTarget
- Includes:
- Target
- Defined in:
- lib/ruby_make_script/target.rb
Instance Attribute Summary collapse
-
#depend ⇒ Object
Returns the value of attribute depend.
-
#doc ⇒ Object
Returns the value of attribute doc.
-
#target ⇒ Object
Returns the value of attribute target.
Instance Method Summary collapse
- #add ⇒ Object
- #from(*dependlist) ⇒ Object
-
#initialize(str) ⇒ PhonyTarget
constructor
A new instance of PhonyTarget.
- #resolve_all ⇒ Object
- #run ⇒ Object
Methods included from Target
#depend_each, #depend_modified?
Constructor Details
#initialize(str) ⇒ PhonyTarget
Returns a new instance of PhonyTarget.
93 94 95 96 97 98 99 100 |
# File 'lib/ruby_make_script/target.rb', line 93 def initialize(str) @target = str @depend = [] @completed = false @doc = $targetdoc $targetdoc = TargetDoc.new end |
Instance Attribute Details
#depend ⇒ Object
Returns the value of attribute depend.
80 81 82 |
# File 'lib/ruby_make_script/target.rb', line 80 def depend @depend end |
#doc ⇒ Object
Returns the value of attribute doc.
81 82 83 |
# File 'lib/ruby_make_script/target.rb', line 81 def doc @doc end |
#target ⇒ Object
Returns the value of attribute target.
79 80 81 |
# File 'lib/ruby_make_script/target.rb', line 79 def target @target end |
Instance Method Details
#add ⇒ Object
111 112 113 114 |
# File 'lib/ruby_make_script/target.rb', line 111 def add $targetlist += [self] $file_target_dict[@target] = self end |
#from(*dependlist) ⇒ Object
102 103 104 105 106 107 108 109 110 |
# File 'lib/ruby_make_script/target.rb', line 102 def from(*dependlist) @depend = dependlist @update_proc = Proc.new { $t = @target $d = @depend yield } add() end |
#resolve_all ⇒ Object
82 83 84 |
# File 'lib/ruby_make_script/target.rb', line 82 def resolve_all resolve(@target) end |
#run ⇒ Object
86 87 88 89 90 91 92 |
# File 'lib/ruby_make_script/target.rb', line 86 def run if ! @completed @update_proc.call @completed = true file_modified!(@target) end end |