Browse files

Added build switches

  • Loading branch information...
1 parent d9255a5 commit f786bf5c06da95b6727a0ab87c3c705c0bdca966 @charliesome committed Jan 31, 2011
Showing with 19 additions and 13 deletions.
  1. +19 −13 build.rb
View
32 build.rb
@@ -1,20 +1,26 @@
#!/usr/bin/env ruby
-print "Building... "
+opt = ARGV.shift
-`rm -rf bin` if Dir.exist? "bin"
-["bin","bin/Fructose","bin/Fructose.Test","bin/Fructose.Test/Tests"].each { |dir| Dir.mkdir dir }
+if opt == "-b" or opt.nil?
+ print "Building... "
-`dmcs -out:bin/Fructose/Fructose.exe -target:exe -reference:lib/IronRuby.dll -reference:lib/Microsoft.Dynamic.dll -reference:lib/Microsoft.Scripting.dll #{Dir.glob("Fructose/**/*.cs").join " "}`
-`cp lib/* bin/Fructose/`
+ `rm -rf bin` if Dir.exist? "bin"
+ ["bin","bin/Fructose","bin/Fructose.Test","bin/Fructose.Test/Tests"].each { |dir| Dir.mkdir dir }
-`dmcs -out:bin/Fructose.Test/Fructose.Test.exe -target:exe -reference:bin/Fructose/Fructose.exe #{Dir.glob("Fructose.Test/**/*.cs").join " "}`
-`cp bin/Fructose/* bin/Fructose.Test/`
-`cp Fructose.Test/Tests/* bin/Fructose.Test/Tests`
-`cp libfructose/* bin/Fructose.Test`
+ `dmcs -out:bin/Fructose/Fructose.exe -target:exe -reference:lib/IronRuby.dll -reference:lib/Microsoft.Dynamic.dll -reference:lib/Microsoft.Scripting.dll #{Dir.glob("Fructose/**/*.cs").join " "}`
+ `cp lib/* bin/Fructose/`
-puts "ok."
+ `dmcs -out:bin/Fructose.Test/Fructose.Test.exe -target:exe -reference:bin/Fructose/Fructose.exe #{Dir.glob("Fructose.Test/**/*.cs").join " "}`
+ `cp bin/Fructose/* bin/Fructose.Test/`
+ `cp Fructose.Test/Tests/* bin/Fructose.Test/Tests`
+ `cp libfructose/* bin/Fructose.Test`
-Dir.chdir "bin/Fructose.Test"
-system("mono Fructose.Test.exe")
-Dir.chdir "../.."
+ puts "ok."
+end
+
+if opt == "-t" or opt.nil?
+ Dir.chdir "bin/Fructose.Test"
+ system("mono Fructose.Test.exe")
+ Dir.chdir "../.."
+end

0 comments on commit f786bf5

Please sign in to comment.