Rakefile in ruby-vpi-7.1.0 vs Rakefile in ruby-vpi-7.2.0

- old
+ new

@@ -151,13 +151,13 @@ desc 'Generate reference for Ruby.' Rake::RDocTask.new 'ref/ruby' do |t| t.rdoc_dir = t.name t.title = "#{PROJECT_NAME}: #{PROJECT_SUMMARY}" - t.options.concat %w(--charset utf-8 --tab-width 2 --line-numbers) - - t.rdoc_files.include '**/*.rb' + t.options.concat %w(--charset utf-8 --line-numbers) + t.rdoc_files.include '{bin,lib/**}/*.rb' + t.main = 'SWIG::TYPE_p_unsigned_int' end directory 'ref/c' CLOBBER.include 'ref/c' @@ -179,21 +179,28 @@ ## # distribution # -distDocs = ['HISTORY', 'README', 'MEMO'].map do |src| +DIST_INFO_HEADER = 'HEADER' + +distDocs = [DIST_INFO_HEADER, 'README', 'HISTORY', 'MEMO'].map do |src| dst = src.downcase << '.html' + dstPartial = src.downcase << '.part.html' - file dst => src do |t| - sh "redcloth < #{t.prerequisites[0]} > #{t.name}" + file dst => [DIST_INFO_HEADER, src] do + sh "redcloth #{DIST_INFO_HEADER unless src == DIST_INFO_HEADER} #{src} > #{dst}" end - CLOBBER.include dst - dst -end + file dstPartial => src do + sh "redcloth < #{src} > #{dstPartial}" + end + CLOBBER.include dst, dstPartial + [dst, dstPartial] +end.flatten + desc "Prepare distribution information." task :dist_info => distDocs desc "Prepare for distribution." @@ -206,11 +213,11 @@ desc 'Publish documentation to website.' task :web => [:web_dist, :web_ref, :web_doc] desc "Publish distribution info." -task :web_dist => distDocs do |t| +task :web_dist => ['style.css', *distDocs] do |t| upload_without_svn PROJECT_SSH_URL, *t.prerequisites end desc "Publish reference documentation." task :web_ref => 'ref' do |t| @@ -254,10 +261,11 @@ s.homepage = PROJECT_URL s.version = releaseVersion s.add_dependency 'rspec', '>= 0.5.4' s.add_dependency 'rake', '>= 0.7.0' + s.add_dependency 'rcov', '>= 0.7.0' s.requirements << "POSIX threads library" s.requirements << "C language compiler" s.files = FileList['**/*'] @@ -295,12 +303,12 @@ ## # testing # desc "Ensure that examples work with $SIMULATOR" -task :test => FileList['samp/*/'] do |t| - t.prerequisites.each do |s| +task :test => :build do + FileList['samp/*/'].each do |s| cd s do - sh 'rake', ENV['SIMULATOR'] || 'ivl' + sh 'rake', ENV['SIMULATOR'] || 'cver' end end end