Sha256: 5de69bcba562afd2cb3d1abab64bc66cac88fb45aa9438dc86adbadd793bfb08

Contents?: true

Size: 1.1 KB

Versions: 2

Compression:

Stored size: 1.1 KB

Contents

module Autobuild
    def self.orogen(opts, &proc)
        Orogen.new(opts, &proc)
    end

    class Orogen < CMake
        class << self
            attr_accessor :corba
        end

        attr_accessor :corba

        attr_accessor :orogen_file
        def initialize(*args, &config)
            @corba       = Orogen.corba
            super

            @orogen_file ||= "#{File.basename(name)}.orogen"

            task "#{name}-prepare" => genstamp
            file genstamp => File.join(srcdir, orogen_file) do
                regen
            end
        end

        def depends_on(*packages)
            super

            packages.each do |p|
                file genstamp => Package[p].installstamp
            end
        end

        def genstamp; File.join(srcdir, '.orogen', 'orogen-stamp') end

        def regen
            cmdline = [Autobuild.tool('orogen')]
            cmdline << '--corba' if corba
            cmdline << orogen_file

            Dir.chdir(srcdir) do
                Subprocess.run name, 'orogen', *cmdline
                touch_stamp genstamp
            end
        end
    end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
autobuild-1.2.3 lib/autobuild/packages/orogen.rb
autobuild-1.2.4 lib/autobuild/packages/orogen.rb