Sha256: f688fd11e6e1e2330e7ade875de1053bc14a71fea2f9c758a7b50ad94df41128

Contents?: true

Size: 1.54 KB

Versions: 7

Compression:

Stored size: 1.54 KB

Contents

#(c) Copyright 2011 Raoul Bonnal. All Rights Reserved. Modified by Ben Woodcroft, 2014

# create Rakefile for shared library compilation



path = File.expand_path(File.dirname(__FILE__))

path_external = File.join(path, "../lib/external")

version = File.open(File.join(path_external,"VERSION"),'r')
Version = version.read
version.close

File.open(File.join(path,"Rakefile"),"w") do |rakefile|
rakefile.write <<-RAKE
require 'rbconfig'
require 'fileutils'
include FileUtils::Verbose
require 'rake/clean'

path = File.expand_path(File.dirname(__FILE__))
path_external = File.join(File.dirname(__FILE__), "../lib/external")

task :compile do
  cd(File.join(File.dirname(__FILE__),'src')) do
    #sh "patch -p1 < ../bioruby.patch"
    case Config::CONFIG['host_os']
      when /linux/

        # Create library with default install params
        $stdout.puts "Making velvet shared library with default parameters"
        sh "make MAXKMERLENGTH=255 finishm velveth velvetg"
        $stdout.puts "Finished make finishm"
        shared_location = 'obj/shared'
        cp(File.join(shared_location,"libfinishm.so.1.0"), path_external)

      when /darwin/
        raise NotImplementedError, "possibly will work, but bio-velvet_underground is not tested on OSX"
      when /mswin|mingw/ then raise NotImplementedError, "bio-velvet_underground library is not available for Windows platform"
    end #case
  end #cd
end

task :clean do
  cd(File.join(path,'src')) do
    sh "make clean"
  end
  rm(File.join(path_external,"libvelvet.so.1.0"))
end

task :default => [:compile]

RAKE

end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
finishm-0.0.8 ext/mkrf_conf.rb
finishm-0.0.7 ext/mkrf_conf.rb
finishm-0.0.6 ext/mkrf_conf.rb
finishm-0.0.5 ext/mkrf_conf.rb
finishm-0.0.4 ext/mkrf_conf.rb
finishm-0.0.2 ext/mkrf_conf.rb
finishm-0.0.1 ext/mkrf_conf.rb