1 # frozen_string_literal: false
2 # optional rake-compiler support in case somebody needs to cross compile
4 mk = "ext/unicorn_http/Makefile"
6 warn "run 'gmake -C ext/unicorn_http clean' and\n" \
7 "remove #{mk} before using rake-compiler"
9 unless File.readable?("ext/unicorn_http/unicorn_http.c")
10 abort "run 'gmake ragel' or 'make ragel' to generate the Ragel source"
12 spec = Gem::Specification.load('unicorn.gemspec')
13 require 'rake/extensiontask'
14 Rake::ExtensionTask.new('unicorn_http', spec)