Sha256: f1e02dcce313f62adbbb10927912834ba75ea70b7a43f7d0c5c0d3ad2d09f778

Contents?: true

Size: 855 Bytes

Versions: 10

Compression:

Stored size: 855 Bytes

Contents

require "fileutils"
require "pathname"

module Buildr
  module Haxe
    module Compiler
      class HXLib < HaxeCompilerBase

        specify :language => :haxe,
                :sources => :hx, :source_ext => :hx,
                :packaging => :hxlib

        def compile(sources, target, dependencies)
          dependency_list = (generate_dependency_args(dependencies) + generate_source_args(sources)).
              reject{|dep| !( dep.start_with?("-cp") || dep.start_with?("-lib") ) }.
              map{ |dep|
                dep.start_with?("-cp") ? "-cp #{relative_path( dep.gsub("-cp ", "").strip, root_project_dir )}" : dep
              }
          file = get_output_file(target)
          FileUtils.mkdir_p File.dirname(file)
          File.open(file, 'w') {|f| f.write( dependency_list.join("\n") ) }
        end

      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
buildr-hx-0.0.24.pre lib/buildr/hx/compiler/hxlib.rb
buildr-hx-0.0.23.pre lib/buildr/hx/compiler/hxlib.rb
buildr-hx-0.0.22.pre lib/buildr/hx/compiler/hxlib.rb
buildr-hx-0.0.21.pre lib/buildr/hx/compiler/hxlib.rb
buildr-hx-0.0.20.pre lib/buildr/hx/compiler/hxlib.rb
buildr-hx-0.0.19.pre lib/buildr/hx/compiler/hxlib.rb
buildr-hx-0.0.18.pre lib/buildr/hx/compiler/hxlib.rb
buildr-hx-0.0.16.pre lib/buildr/hx/compiler/hxlib.rb
buildr-hx-0.0.14.pre lib/buildr/hx/compiler/hxlib.rb
buildr-hx-0.0.12.pre lib/buildr/hx/compiler/hxlib.rb