Class: TTK::Strategies::Make
- 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
Instance Method Summary collapse
- #mk_cmd(target, continue_mode, jobs = nil, options = '') ⇒ Object
- #mk_make_cmd ⇒ Object
- #prologue ⇒ Object
Methods inherited from Proxy
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, ='' ) make = mk_make_cmd() unless .empty? case when Array = ' ' + .join(' ') when String = " #{}" end end opts = '' opts += ' -k' if continue_mode opts += " -j#{jobs}" if jobs "#{make} #{target}#{opts}#{}" end |
#mk_make_cmd ⇒ Object
14 15 16 |
# File 'lib/ttk/strategies/Make.rb', line 14 def mk_make_cmd @symtbl[:make] || ENV['MAKE'] || 'make' end |
#prologue ⇒ Object
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 |