diff options
author | Wayne Meissner <wmeissner@gmail.com> | 2010-02-16 21:32:30 +1000 |
---|---|---|
committer | Wayne Meissner <wmeissner@gmail.com> | 2010-02-16 21:32:30 +1000 |
commit | 980ec93b6cfb49d4ce57dec55de8ea773ae9436d (patch) | |
tree | ee15b07f5428ad314c060fd79eafca2d010b0ec1 | |
parent | 4465ce2e52f56f48da79d19e0d070dd26bd98be1 (diff) | |
download | ffi-980ec93b6cfb49d4ce57dec55de8ea773ae9436d.tar.gz |
Tweak gen/Rakefile to be callable as both a gem Rakefile extension and normally. Based on changes from Diego Elio 'Flameeyes' Pettenò <flameeyes@gmail.com>
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | Rakefile | 1 | ||||
-rw-r--r-- | gen/Rakefile | 6 |
3 files changed, 6 insertions, 2 deletions
@@ -9,3 +9,4 @@ build *.so *.[oa] core +lib/ffi/types.conf @@ -147,6 +147,7 @@ task :distclean => :clobber do FileUtils.rm_rf(Dir["lib/**/ffi_c.#{Config::CONFIG['DLEXT']}"]) FileUtils.rm_rf('lib/1.8') FileUtils.rm_rf('lib/1.9') + FileUtils.rm_rf('lib/ffi/types.conf') FileUtils.rm_rf('conftest.dSYM') FileUtils.rm_rf('pkg') end diff --git a/gen/Rakefile b/gen/Rakefile index f97f845..2b16621 100644 --- a/gen/Rakefile +++ b/gen/Rakefile @@ -1,6 +1,7 @@ require 'fileutils' -require "#{File.join(ENV['RUBYLIBDIR'], 'ffi', 'tools', 'types_generator.rb')}" -types_conf = File.join(ENV['RUBYLIBDIR'], 'ffi', 'types.conf') +require "#{File.join(File.dirname(__FILE__), '..', 'lib', 'ffi', 'tools', 'types_generator.rb')}" +types_conf = File.join(File.dirname(__FILE__), '..', 'lib', 'ffi', 'types.conf') + file types_conf do |task| options = {} FileUtils.mkdir_p(File.dirname(task.name), { :mode => 0755 }) @@ -8,5 +9,6 @@ file types_conf do |task| f.puts FFI::TypesGenerator.generate(options) end end + task :default => types_conf do end |