Class: TTK::Strategies::Make

Inherits:
Proxy show all
Includes:
Concrete
Defined in:
lib/ttk/strategies/Make.rb

Defined Under Namespace

Classes: All, Check, Default, DistCheck, Install, Target

Instance Attribute Summary

Attributes inherited from Strategy

#status, #symtbl

Instance Method Summary collapse

Methods inherited from Proxy

#create

Methods inherited from Composite

#<<, #create, #initialize, #initialize_test, #new_symtbl

Methods inherited from Strategy

#abort, #assign, #clean_instance_variables, #display_unexpected_exc, #display_unexpected_synflow_exc, #fail, #initialize, #initialize_flow_factory, #pass, #raise_error, #reject, #run, #running?, #skip, #skip_if_cached, #strategy, #strategy=, #symbols=, #testify, #timeout=, #to_s, #wclass=

Constructor Details

This class inherits a constructor from TTK::Strategies::Composite

Instance Method Details

#mk_cmd(target, continue_mode, jobs = nil, options = '') ⇒ Object



18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# File 'lib/ttk/strategies/Make.rb', line 18

def mk_cmd ( target, continue_mode, jobs=nil, options='' )
  make = mk_make_cmd()
  unless options.empty?
    case options
    when Array
      options = ' ' + options.join(' ')
    when String
      options = " #{options}"
    end
  end
  opts = ''
  opts += ' -k' if continue_mode
  opts += " -j#{jobs}" if jobs
  "#{make} #{target}#{opts}#{options}"
end

#mk_make_cmdObject



14
15
16
# File 'lib/ttk/strategies/Make.rb', line 14

def mk_make_cmd
  @symtbl[:make] || ENV['MAKE'] || 'make'
end

#prologueObject



34
35
36
37
38
39
40
41
42
43
44
45
# File 'lib/ttk/strategies/Make.rb', line 34

def prologue 
  super
  cmd = mk_cmd(@target.target, @continue_mode, @jobs, @options)
  create(Cmd) do |test|
    test.name = 'internal command'
    test.exit = 0
    test.dir = @dir
    test.command = cmd
    test.reject :strategy, :exit, :fatal, :dir
    # test.reject :status
  end
end