taf2 / md5-partial

Calculate an MD5 digest in parts, saving and restoring the calculation

This URL has Read+Write access

md5-partial / Rakefile
100644 25 lines (18 sloc) 0.522 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
require 'rake/clean'
 
DLEXT=Config::MAKEFILE_CONFIG['DLEXT']
CLEAN.include '**/*.o'
CLEAN.include "**/*.#{DLEXT}"
CLOBBER.include '**/*.log'
CLOBBER.include '**/Makefile'
TARGET="md5partial.#{DLEXT}"
 
task :default => :test
 
file 'ext/Makefile' => 'ext/extconf.rb' do
  Dir.chdir('ext') { ruby 'extconf.rb' }
end
 
file TARGET => (['ext/Makefile'] + Dir['ext/*.c'] + Dir['ext/*.h']) do
  Dir.chdir('ext') { system("make") }
end
 
task :compile => TARGET
 
task :test => :compile do
  Dir.chdir('test') { ruby 'test.rb' }
end