Rakefile in libyajl2-0.1.16 vs Rakefile in libyajl2-0.1.17
- old
+ new
@@ -82,16 +82,16 @@
# copy yajl files into build position
FileUtils.cp Dir["#{vendor_src_path}/*.c"], build_path
FileUtils.cp Dir["#{vendor_src_path}/*.h"], build_path
# the *.c files need api/yajl_foo.h headers
- Dir.mkdir "#{build_path}/api" unless Dir.exist?("#{build_path}/api")
+ Dir.mkdir "#{build_path}/api" unless File.exist?("#{build_path}/api")
FileUtils.cp Dir["#{vendor_src_path}/api/*.h"], "#{build_path}/api"
# the header files need yajl/yajl_foo.h headers (and windows symlinks
# are a bit of a PITA so just copy them all)
- Dir.mkdir "#{build_path}/yajl" unless Dir.exist?("#{build_path}/yajl")
+ Dir.mkdir "#{build_path}/yajl" unless File.exist?("#{build_path}/yajl")
FileUtils.cp Dir["#{vendor_src_path}/api/*.h"], "#{build_path}/yajl"
# apply patches that haven't yet been pushed upstream
Dir["#{build_path}/patches/*"].sort.each do |file|
Dir.chdir build_path
@@ -100,10 +100,19 @@
# generate the yajl_version.h header file without invoking cmake
generate_yajl_version
end
+desc "Deploy headers (for after compile)"
+task :headers do
+ include_path = File.expand_path("../lib/libyajl2/vendored-libyajl2/include/yajl", __FILE__)
+ build_path = File.expand_path("../ext/libyajl2", __FILE__)
+
+ FileUtils.mkdir_p(include_path)
+ FileUtils.cp Dir["#{build_path}/api/*.h"], include_path
+end
+
#
# FIXME: need a rake task to update the git submodule and need to do that before shipping
#
# to ship, update lib/libyajl2/version.rb and commit that, then:
#
@@ -203,11 +212,11 @@
desc 'Run all style checks'
task :style => ['style:rubocop', 'style:reek']
desc 'Run style + spec tests by default on travis'
-task :travis => ['prep', 'compile', 'spec', 'style']
+task :travis => ['spec', 'style']
desc 'Run style, spec and test kichen on travis'
-task :travis_all => ['prep', 'compile', 'spec', 'integration:cloud', 'style']
+task :travis_all => ['spec', 'integration:cloud', 'style']
-task :default => ['prep', 'compile', 'spec', 'integration:vagrant', 'style']
+task :default => ['spec', 'integration:vagrant', 'style']