# HG changeset patch # User Kazuma Takeda # Date 1487837959 -32400 # Node ID db1d9ae4c4f687aa41ac813825431b93600d5e33 # Parent b4bb6f193a44b0aca19396252347e18e1f347d90 compile dll. diff -r b4bb6f193a44 -r db1d9ae4c4f6 rakefile.rb --- a/rakefile.rb Thu Feb 23 13:46:21 2017 +0900 +++ b/rakefile.rb Thu Feb 23 17:19:19 2017 +0900 @@ -1,5 +1,5 @@ CSC = "mcs" - +CSR = "mono" UNITY_SRC = [ "Test/junge-main/DefaultJungleTreeTest.cs", "Test/junge-main/data/list/ListTest.cs", @@ -26,13 +26,21 @@ SRC.exclude(f) end +TEST_SRC = "Test/junge-main/TestJungleCore.cs" +TEST_EXE = "Test/junge-main/TestJungleCore.exe" +SRC.exclude(TEST_SRC) BUILD_DIR = "build" -FULL_NAME = "jungle-sharp.exe" +FULL_NAME = "jungle-sharp.dll" TARGET = 'library' REFS = ["jungle-sharp.dll"] task :default => :compile task :compile do sh "#{CSC} -debug -out:#{FULL_NAME} -target:#{TARGET} -lib:#{BUILD_DIR}-r:#{REFS.join(',')} #{SRC}" end + +task :test => [:compile] do + sh "#{CSC} -debug -out:#{TEST_EXE} -target:exe #{TEST_SRC} -r:jungle-sharp.dll" + sh "#{CSR} #{TEST_EXE}" +end