Skip to content
Browse files

Improved compiling and running tests works via rake.

  • Loading branch information...
1 parent 7bf9c32 commit c571a1fab946f5eb9838d766fc933baf1040a839 @mtodd committed Jul 4, 2009
Showing with 6 additions and 3 deletions.
  1. +6 −3 Rakefile
View
9 Rakefile
@@ -21,7 +21,7 @@ task :clean do
end
desc "Generate the Makefile used to compile"
-task :generate_makefile do
+task :generate_makefile => [:clean] do
do_run "ruby extconf.rb"
end
@@ -39,10 +39,13 @@ task :all do
%x{env EXT=#{level} rake generate_makefile}
%x{env EXT=#{level} rake compile}
end
- %x{rake}
+ puts %x{rake}
end
def do_run cmd, context = "samples/#{ENV['EXT']}"
pwd = Dir.pwd
- %x{cd "#{context}" && env EXT=#{ENV['EXT']} #{cmd}; cd "#{pwd}"}
+ # cmd += " --trace" if cmd =~ /rake/ && true
+ cmd = %(cd "#{context}" && env EXT=#{ENV['EXT']} #{cmd}; cd "#{pwd}")
+ puts cmd
+ puts "=> %s" % %x{#{cmd}}
end

0 comments on commit c571a1f

Please sign in to comment.
Something went wrong with that request. Please try again.