projects
/
ruby-eet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
1bf8db3
)
Code cleanup.
author
Tilman Sauerbeck
<tilman@code-monkey.de>
Thu, 19 May 2005 19:18:21 +0000
(19:18 +0000)
committer
Tilman Sauerbeck
<tilman@code-monkey.de>
Thu, 19 May 2005 19:18:21 +0000
(19:18 +0000)
Rakefile
patch
|
blob
|
history
diff --git
a/Rakefile
b/Rakefile
index 03fc22e9fccc2f2ef1a68aa762cb732a0ee46c44..1b4f270bb99fa9e524f1829f031c071911e0260b 100644
(file)
--- a/
Rakefile
+++ b/
Rakefile
@@
-1,4
+1,4
@@
-# $Id: Rakefile
32 2005-04-19 09:07:57
Z tilman $
+# $Id: Rakefile
41 2005-05-19 19:18:21
Z tilman $
require "rbconfig"
require "rake/clean"
require "rbconfig"
require "rake/clean"
@@
-22,33
+22,36
@@
ext_lib = "ext/eet_ext.so"
CLOBBER.include(ext_obj, ext_lib, "test/*.eet")
CLOBBER.include(ext_obj, ext_lib, "test/*.eet")
-archdir = Config::CONFIG["archdir"]
-sitearchdir = Config::CONFIG["sitearchdir"]
-libdir = Config::CONFIG["libdir"]
-sitelibdir = Config::CONFIG["sitelibdir"]
-rubylib = Config::CONFIG["LIBRUBYARG_SHARED"]
-destdir = "#{ENV["DESTDIR"]}"
-eet_cflags = `eet-config --cflags`.strip
-eet_libs = `eet-config --libs`.strip
-cflags = "#{ENV["CFLAGS"]} #{eet_cflags}"
-ldflags = "#{ENV["LDFLAGS"]} #{eet_libs}"
-
task :default => [ext_lib]
rule ".o" => [".c"] do |t|
task :default => [ext_lib]
rule ".o" => [".c"] do |t|
- sh "cc #{cflags} -fPIC -I #{archdir} #{t.source} -c -o #{t.name}"
+ archdir = Config::CONFIG["archdir"]
+ cflags = "#{ENV["CFLAGS"]} #{`eet-config --cflags`.strip} " +
+ "-I#{archdir}"
+
+ sh "cc #{cflags} -fPIC #{t.source} -c -o #{t.name}"
end
file ext_lib => ext_obj do |t|
end
file ext_lib => ext_obj do |t|
- sh "cc #{ldflags} -shared -Wl -L #{libdir} #{rubylib} " +
- "#{t.prerequisites.join(" ")} -o #{t.name}"
+ libdir = Config::CONFIG["libdir"]
+ rubylib = Config::CONFIG["LIBRUBYARG_SHARED"]
+ ldflags = "#{ENV["LDFLAGS"]} #{`eet-config --libs`.strip} " +
+ "-L#{libdir} #{rubylib}"
+
+ sh "cc #{ldflags} -shared -Wl #{t.prerequisites.join(" ")} " +
+ "-o #{t.name}"
end
task :install => [ext_lib] do |t|
end
task :install => [ext_lib] do |t|
- FileUtils::Verbose.install(ext_lib, destdir + sitearchdir,
- :mode => 0755)
- FileUtils::Verbose.install("lib/eet.rb", destdir + sitelibdir,
- :mode => 0644)
+ destdir = ENV["DESTDIR"] || ""
+
+ ddir = destdir + Config::CONFIG["sitearchdir"]
+ FileUtils::Verbose.mkdir_p(ddir) unless File.directory?(ddir)
+ FileUtils::Verbose.install(ext_lib, ddir, :mode => 0755)
+
+ ddir = destdir + Config::CONFIG["sitelibdir"]
+ FileUtils::Verbose.mkdir_p(ddir) unless File.directory?(ddir)
+ FileUtils::Verbose.install("lib/eet.rb", ddir, :mode => 0644)
end
task :test => [ext_lib]
end
task :test => [ext_lib]