Sha256: 64e465056518b719bd48d768c397ea9d9116f370ba72acdb779fc84315c189ca

Contents?: true

Size: 761 Bytes

Versions: 1

Compression:

Stored size: 761 Bytes

Contents

require "rspec/core/rake_task"
RSpec::Core::RakeTask.new(:spec)

desc "Build H3 C library"
task :build do
  unless File.exists?("ext/h3/src/Makefile")
    `git submodule update --init --recursive`
    print "Building h3..."
    `cd ext/h3; make > /dev/null 2>&1`
    puts " done."
  end
end

desc "Remove compiled H3 library"
task :clean do
  File.delete("ext/h3/src/Makefile") if File.exists?("ext/h3/src/Makefile")
  FileUtils.remove_dir("ext/h3/src/bin") if Dir.exists?("ext/h3/src/bin")
  FileUtils.remove_dir("ext/h3/src/generated") if Dir.exists?("ext/h3/src/generated")
  FileUtils.remove_dir("ext/h3/src/lib") if Dir.exists?("ext/h3/src/lib")
end

task spec: :build

desc "Recompile the H3 C library"
task rebuild: [:clean, :build]

task default: :spec

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
h3-3.3.1 Rakefile