diff rakefile @ 3:4c0057e71936

Made a class for StringBuffer
author Frank Benoit <benoit@tionex.de>
date Wed, 04 Mar 2009 22:35:46 +0100
parents 0e8eed4cac02
children 2847134a5fc0
line wrap: on
line diff
--- a/rakefile	Wed Mar 04 21:41:18 2009 +0100
+++ b/rakefile	Wed Mar 04 22:35:46 2009 +0100
@@ -11,6 +11,7 @@
 OBJDIR="obj"
 DIMPDIR="imp"
 RSPNAME="rsp"
+ALL_RESDIRS= [ "java/res", "org.eclipse.swt.win32.win32.x86/res" ]
 
 class String
     def to_path
@@ -35,6 +36,9 @@
     rsp.puts "-I#{srcdir_abs.to_path}"
     rsp.puts "-I#{dimpdir_abs.to_path}"
     rsp.puts "-J#{resdir_abs.to_path}"
+    ALL_RESDIRS.each do | dir |
+        rsp.puts "-J#{File.expand_path(dir).to_path}"
+    end
     rsp.puts "-c"
     rsp.puts "-op"
     rsp.puts "-version=TANGOSVN"
@@ -48,7 +52,16 @@
     Dir.chdir(basedir) do
         puts "Compile"
         sh "#{DMD} @#{rspfile_abs.to_path}" do |ok, res|
-            raise "compile error" unless ok
+
+            if !ok then
+                Find.find( srcdir_abs ) do |path|
+                    if FileTest.file?(path) && path =~ /\.di$/ then
+                        FileUtils.rm path
+                    end
+                end
+
+                raise "compile error"
+            end
         end
     end
 
@@ -72,6 +85,13 @@
 
 end
 
+desc "Clean"
+task :clean do
+    FileUtils.rm_rf DIMPDIR
+    FileUtils.rm_rf OBJDIR
+    FileUtils.rm_rf RSPNAME
+end
+
 desc "Build Java"
 task :java do
     buildTree( "java", "src", "res" )
@@ -82,3 +102,8 @@
     buildTree( "org.eclipse.swt.win32.win32.x86", "src", "res" )
 end
 
+desc "Build jface"
+task :jface do
+    buildTree( "org.eclipse.jface", "src", "res" )
+end
+