X-Git-Url: http://git.code-monkey.de/?p=ruby-eet.git;a=blobdiff_plain;f=Rakefile;h=178c69fc060454d05f46ce2149bf0c17bfe536ce;hp=3ab381d3ba8638f7bb89fb2b34d7a08fe77a4d91;hb=HEAD;hpb=2ff30a3e85ffcae7ed66e1c73d67626fcf5a5f8b diff --git a/Rakefile b/Rakefile index 3ab381d..178c69f 100644 --- a/Rakefile +++ b/Rakefile @@ -9,14 +9,18 @@ require "rake/contrib/sshpublisher" require "rake/configuretask" require "rake/extensiontask" -# make sure we run at least Rake 0.5.0 -if (RAKEVERSION.split(".").map { |p| p.to_i } <=> [0, 5, 0]) < 0 - raise("Rake 0.5.0 or greater required") -end - PKG_NAME = "ruby-eet" PKG_VERSION = File.read("lib/eet.rb"). match(/^\s*VERSION = \"(.*)\"\s$/).captures.first +PKG_FILES = FileList[ + "AUTHORS", "COPYING", "ChangeLog", "NEWS", "README", "Rakefile", + "rake/configuretask.rb", "rake/extensiontask.rb", + "ext/ext.c", "lib/eet.rb", + "test/common.rb", "test/test_array_sub.rb", "test/test_basic.rb", + "test/test_broken_classes.rb", "test/test_chunk.rb", + "test/test_hash.rb", "test/test_list.rb", "test/test_misc.rb", + "test/test_stream.rb", "test/test_sub.rb" +] CLOBBER.include("test/*.eet") @@ -42,6 +46,10 @@ task :pre_ext => [:configure] do config.eet.cflags ] + if [0xff].pack("s") == "\x00\xff" + ext.env.update(:defines => "WORDS_BIGENDIAN") + end + ext.env.update(:cflags => cflags) end @@ -81,9 +89,7 @@ end Rake::PackageTask.new(PKG_NAME, PKG_VERSION) do |t| t.need_tar_gz = true - t.package_files.include("AUTHORS", "ChangeLog", "COPYING", "NEWS", - "README", "Rakefile", - "ext/*.c", "lib/*.rb", "test/*.rb") + t.package_files = PKG_FILES end task :publish => [:rdoc, :package] do