Class Uttk::Strategies::Configure
In: lib/uttk/strategies/Configure.rb
Parent: Strategy

I run then check whether the configure stage of a compilation process fail. I used in the Package strategy to handle the configuration stage.

Methods

Included Modules

Concrete

Constants

CONFIGURE = /^configure(\.sh)?$/
CONFIGURE_INPUT = /^configure\.(ac|in)$/

Public Class methods

[Source]

# File lib/uttk/strategies/Configure.rb, line 62
      def self.have_configure? ( dir=Pathname.new('.') )
        res = dir.entries.find { |ent| ent.to_s =~ CONFIGURE }
        (res.nil?) ? nil : dir + res
      end

[Source]

# File lib/uttk/strategies/Configure.rb, line 57
      def self.have_configure_input? ( dir=Pathname.new('.') )
        res = dir.entries.find { |ent| ent.to_s =~ CONFIGURE_INPUT }
        (res.nil?) ? nil : dir + res
      end

Protected Instance methods

[Source]

# File lib/uttk/strategies/Configure.rb, line 45
      def abort_hook
        @runner.abort @my_data if @runner and defined? @my_data
        super
      end

[Source]

# File lib/uttk/strategies/Configure.rb, line 38
      def assertion
        assert_cmd UM::StreamMatcher, @my_data,
                   :exit => 0, :error => nil, :output => nil
        pass
      end

[Source]

# File lib/uttk/strategies/Configure.rb, line 51
      def epilogue
        @my_data.clean if defined? @my_data
        super
      end

[Source]

# File lib/uttk/strategies/Configure.rb, line 19
      def prologue
        super
        @runner = mk_system_runner
        @dir = @dir.to_path
        if script = self.class.have_configure?(@dir)
          flags = @flags.to_ocmd_args + @symtbl[:configure_flags].to_ocmd_args
          flags << "--prefix=#@prefix" if @prefix
          @symtbl[:configure_flags] = flags
          @configure = script.to_ocmd + @flags
          @configure.dir = @dir
        end
      end

[Source]

# File lib/uttk/strategies/Configure.rb, line 33
      def run_impl
        @my_data = @configure.run @runner
      end

[Validate]