Class Uttk::Strategies::Compile
In: lib/uttk/strategies/Compile.rb
Parent: Proxy

I‘m not maintained that much since the Package strategy do a better job than I. Can be useful if you have only few files to compile and do not have a Makefile.

Methods

Included Modules

Concrete

Public Instance methods

[Source]

# File lib/uttk/strategies/Compile.rb, line 18
      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/uttk/strategies/Compile.rb, line 33
      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]