Create target directory if it doesn't exist yet.
[ruby-edje.git] / Rakefile
index 59351d620302865ddd8c1f0f4b6c039fb3cb8656..fcf776a89738947530f8a63cf7eb48eece669a99 100644 (file)
--- a/Rakefile
+++ b/Rakefile
@@ -1,4 +1,4 @@
-# $Id: Rakefile 341 2005-05-07 11:02:51Z tilman $
+# $Id: Rakefile 378 2006-02-25 10:13:07Z tilman $
 
 require "library"
 require "rake/clean"
@@ -31,6 +31,7 @@ task :install => [ext_lib.so] do |t|
        destdir = "#{ENV["DESTDIR"]}"
        sitearchdir = ENV["RUBYARCHDIR"] || Config::CONFIG['sitearchdir']
 
-       FileUtils::Verbose.install(ext_lib.so, destdir + sitearchdir,
-                                  :mode => 0755)
+       ddir = destdir + sitearchdir
+       FileUtils::Verbose.mkdir_p(ddir) unless File.directory?(ddir)
+       FileUtils::Verbose.install(ext_lib.so, ddir, :mode => 0755)
 end