Class TTK::Strategies::Compile
In: lib/ttk/strategies/Compile.rb
Parent: Proxy

Methods

Included Modules

Concrete

Public Instance methods

[Source]

# File lib/ttk/strategies/Compile.rb, line 15
      def mk_command
        # Build compiling command
        command = ''
        unless @source_dir.nil?
          @source_dir = Pathname.new(@source_dir)
          @source.map! { |file| @source_dir + file }
        end
        command << @compiler << ' ' << @flags
        @include.each do |dir|
          command << ' -I ' << dir
        end
        command << ' ' << @source.join(' ')
        command << ' -o ' << @bin
      end

[Source]

# File lib/ttk/strategies/Compile.rb, line 30
      def prologue 
        super
        test = create(self, Cmd)
        test.name = 'internal command'
        test.exit = 0
        test.fatal = true
        test.command = mk_command

        # Configure output
        test.reject :exit
        test.reject :fatal
      end

[Validate]