Class: Uttk::Strategies::Make

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

Defined Under Namespace

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

Instance Attribute Summary

Attributes inherited from Strategy

#status

Instance Method Summary collapse

Methods inherited from Proxy

#create

Methods inherited from Composite

#<<, #contents, #create, #initialize, #initialize_copy, #initialize_test

Methods inherited from Strategy

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

Constructor Details

This class inherits a constructor from Uttk::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/uttk/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/uttk/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/uttk/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