ry / ebb fork watch download tarball
public this repo is viewable by everyone
Description: web server
Homepage: http://ebb.rubyforge.org
Clone URL: git://github.com/ry/ebb.git
better rake compile task
Ryan Dahl (author)
about 1 month ago
commit  213605bb5242a3474f7395d5d50fdbd69ec1a295
tree    37ee175af5a9ced1e2a6e9527a7f36a02fd464ed
parent  d2ee83848661e9374c8736cb7411711ba3862c2d
...
8
9
10
11
 
12
13
14
...
27
28
29
30
 
31
32
 
 
 
 
 
 
 
33
34
35
 
 
 
36
37
38
...
41
42
43
44
45
46
47
48
...
102
103
104
105
106
107
108
109
...
8
9
10
 
11
12
13
14
...
27
28
29
 
30
31
 
32
33
34
35
36
37
38
39
 
 
40
41
42
43
44
45
...
48
49
50
 
 
51
52
53
...
107
108
109
 
 
 
 
 
0
@@ -8,7 +8,7 @@ COMMON_DISTFILES = FileList.new('src/ebb.{c,h}', 'src/parser.{c,h}',
0
 
0
 RUBY_DISTFILES = COMMON_DISTFILES + FileList.new('src/ebb_ruby.c',
0
   'src/extconf.rb', 'ruby_lib/**/*', 'benchmark/*.rb', 'bin/ebb_rails',
0
- 'test/*')
0
+ 'test/*.rb')
0
 
0
 PYTHON_DISTFILES = COMMON_DISTFILES + FileList.new('setup.py',
0
   'src/ebb_python.c')
0
@@ -27,12 +27,19 @@ def dir(path)
0
   File.expand_path File.join(File.dirname(__FILE__), path)
0
 end
0
 
0
-task(:default => :test)
0
+task(:default => [:compile, :test])
0
 
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
+end
0
+
0
+file('src/Makefile' => 'src/extconf.rb') do
0
+ sh "cd #{dir('src')} && ruby extconf.rb"
0
+end
0
 
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
 end
0
 
0
 file('MANIFEST') do
0
@@ -41,8 +48,6 @@ file('MANIFEST') do
0
   end
0
 end
0
 
0
-
0
-
0
 task(:wc) { sh "wc -l ruby_lib/*.rb src/ebb*.{c,h}" }
0
 
0
 task(:test => RUBY_DISTFILES)
0
@@ -102,8 +107,3 @@ end
0
 Rake::GemPackageTask.new(spec) do |pkg|
0
   pkg.need_zip = true
0
 end
0
-
0
-## Compile
0
-file('src/parser.c' => 'src/parser.rl') do
0
- sh 'ragel -s -G2 src/parser.rl'
0
-end

Comments

    No one has commented yet.