#!/usr/bin/ruby require 'rake/testtask' require 'rake/rdoctask' task :default => [:compile,:test,:copy] task :compile => ["TagLib.so"] task :docs => ["TagLib_doc.rb"] do |t| system %(rdoc -f html TagLib_doc.rb) end file "TagLib_doc.rb" => ["make_doc.rb","TagLib.so","xml"] do |t| system %(ruby make_doc.rb) end file "xml" => ["Doxyfile"] do |t| system %(doxygen) end task :test => ["TagLib.so"] do |t| system %(ruby "test.rb") end task :copy => [:test, :docs] do |t| system %(cp extconf.rb taglib.cxx ../ext/taglib/) system %(cp test.rb ../test/test_taglib.rb) system %(cp TagLib_doc.rb ../lib/) end file "TagLib.so" => ["taglib.cxx","Makefile"] do |t| system %(make) end file "Makefile" => ["extconf.rb"] do |t| system %(ruby extconf.rb) end file "taglib.cxx" => ["taglib.i", "process_cxx.rb"] do |t| puts "Actualizando swig" if !system %(swig -fvirtual -Wall -c++ -o pre_taglib -ruby taglib.i) system %(rm *.o *.so *.cxx) end system %(ruby process_cxx.rb) end task :clean =>[] do |t| system %(rm *.o *.so *.cxx *~ Makefile) end