Sha256: c67fbeb4b3863d8538d720312ec87cc5cce9c807ab3b06a1f9b831a0048d1e88

Contents?: true

Size: 755 Bytes

Versions: 9

Compression:

Stored size: 755 Bytes

Contents

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

desc "Build H3 C library"
task :build do
  unless File.exist?("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.exist?("ext/h3/src/Makefile")
  FileUtils.remove_dir("ext/h3/src/bin") if Dir.exist?("ext/h3/src/bin")
  FileUtils.remove_dir("ext/h3/src/generated") if Dir.exist?("ext/h3/src/generated")
  FileUtils.remove_dir("ext/h3/src/lib") if Dir.exist?("ext/h3/src/lib")
end

task spec: :build

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

task default: :spec

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
h3-3.7.2 Rakefile
h3-3.7.1 Rakefile
h3-3.6.2 Rakefile
h3-3.6.1 Rakefile
h3-3.6.0 Rakefile
h3-3.5.1 Rakefile
h3-3.5.0 Rakefile
h3-3.4.4 Rakefile
h3-3.4.0 Rakefile