0
@@ -8,7 +8,7 @@ COMMON_DISTFILES = FileList.new('src/ebb.{c,h}', 'src/parser.{c,h}',
0
RUBY_DISTFILES = COMMON_DISTFILES + FileList.new('src/ebb_ruby.c',
0
'src/extconf.rb', 'ruby_lib/**/*', 'benchmark/*.rb', 'bin/ebb_rails',
0
PYTHON_DISTFILES = COMMON_DISTFILES + FileList.new('setup.py',
0
@@ -27,12 +27,19 @@ def dir(path)
0
File.expand_path File.join(File.dirname(__FILE__), path)
0
-task(:default => :test)
0
+task(:default => [:compile, :test])
0
-task(:package => 'src/parser.c')
0
+task(:compile => ['src/Makefile', 'src/ebb.c', 'src/ebb.h', 'src/ebb_ruby.c', 'src/parser.c']) do
0
+ sh "cd #{dir('src')} && make"
0
+file('src/Makefile' => 'src/extconf.rb') do
0
+ sh "cd #{dir('src')} && ruby extconf.rb"
0
-task(:compile => 'src/parser.c') do
0
- sh "cd #{dir('src')} && ruby extconf.rb && make"
0
+task(:package => 'src/parser.c')
0
+file('src/parser.c' => 'src/parser.rl') do
0
+ sh 'ragel -s -G2 src/parser.rl'
0
@@ -41,8 +48,6 @@ file('MANIFEST') do
0
task(:wc) { sh "wc -l ruby_lib/*.rb src/ebb*.{c,h}" }
0
task(:test => RUBY_DISTFILES)
0
Rake::GemPackageTask.new(spec) do |pkg|
0
-file('src/parser.c' => 'src/parser.rl') do
0
- sh 'ragel -s -G2 src/parser.rl'
Comments
No one has commented yet.