X-Git-Url: http://git.code-monkey.de/?a=blobdiff_plain;f=Rakefile;h=f49c8367e18be29fb27e01bde63b82c31bac3ee9;hb=e9513effeff9ce6dc837ffbecff1a86f2064d67d;hp=1b4f270bb99fa9e524f1829f031c071911e0260b;hpb=0afbe4e78edabc939a32bef4b4ce4d0d970645e9;p=ruby-eet.git diff --git a/Rakefile b/Rakefile index 1b4f270..f49c836 100644 --- a/Rakefile +++ b/Rakefile @@ -1,5 +1,3 @@ -# $Id: Rakefile 41 2005-05-19 19:18:21Z tilman $ - require "rbconfig" require "rake/clean" require "rake/testtask" @@ -17,6 +15,7 @@ PKG_NAME = "ruby-eet" PKG_VERSION = File.read("lib/eet.rb"). match(/^\s*VERSION = \"(.*)\"\s$/).captures.first +cc = ENV["CC"] || "cc" ext_obj = "ext/ext.o" ext_lib = "ext/eet_ext.so" @@ -29,7 +28,7 @@ rule ".o" => [".c"] do |t| cflags = "#{ENV["CFLAGS"]} #{`eet-config --cflags`.strip} " + "-I#{archdir}" - sh "cc #{cflags} -fPIC #{t.source} -c -o #{t.name}" + sh "#{cc} #{cflags} -fPIC #{t.source} -c -o #{t.name}" end file ext_lib => ext_obj do |t| @@ -38,7 +37,7 @@ file ext_lib => ext_obj do |t| ldflags = "#{ENV["LDFLAGS"]} #{`eet-config --libs`.strip} " + "-L#{libdir} #{rubylib}" - sh "cc #{ldflags} -shared -Wl #{t.prerequisites.join(" ")} " + + sh "#{cc} #{ldflags} -shared -Wl #{t.prerequisites.join(" ")} " + "-o #{t.name}" end @@ -66,19 +65,27 @@ Rake::RDocTask.new do |t| t.rdoc_dir = "doc" t.title = "Ruby-EET - EET bindings for Ruby" t.options = ["--line-numbers", "--inline-source", "--main", "README"] - t.rdoc_files.include("README", "COPYING", "AUTHORS", "ChangeLog", + t.rdoc_files.include("README", "COPYING", "AUTHORS", "NEWS", "ext/ext.c", "lib/eet.rb") end +CLOBBER.include("ChangeLog") + +file "ChangeLog" do + `git log > ChangeLog` +end + Rake::PackageTask.new(PKG_NAME, PKG_VERSION) do |t| t.need_tar_gz = true - t.package_files.include("[A-Z]*", "ext/*.c", "lib/*.rb", "test/*.rb") + t.package_files.include("AUTHORS", "ChangeLog", "COPYING", "NEWS", + "README", "Rakefile", + "ext/*.c", "lib/*.rb", "test/*.rb") end task :publish => [:rdoc, :package] do p = Rake::CompositePublisher.new p.add(Rake::SshFreshDirPublisher.new("code-monkey.de", - "public_html/docs/" + + "public_docs/" + PKG_NAME, "doc")) p.add(Rake::SshFilePublisher.new("code-monkey.de", ".", "pkg",