Created
August 6, 2009 11:46
-
-
Save gnufied/163270 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From 92f048e1082e66c54f13c76c5b8ca8b42dd00bf2 Mon Sep 17 00:00:00 2001 | |
From: Hemant Kumar <[email protected]> | |
Date: Thu, 6 Aug 2009 17:13:56 +0530 | |
Subject: [PATCH] update rakefile for better path | |
--- | |
Rakefile | 27 ++++++++++++++------------- | |
1 files changed, 14 insertions(+), 13 deletions(-) | |
diff --git a/Rakefile b/Rakefile | |
index 222bb7d..9695d2a 100644 | |
--- a/Rakefile | |
+++ b/Rakefile | |
@@ -20,7 +20,7 @@ | |
# # both contain the proper references to OPENSSL. Use the static version | |
# # of the libraries, not the dynamic, otherwise we expose the user to a | |
# # runtime dependency. | |
-# | |
+# | |
# # To build a binary gem for win32, first build rubyeventmachine.so | |
# # using VC6 outside of the build tree (the normal way: ruby extconf.rb, | |
# # and then nmake). Then copy rubyeventmachine.so into the lib directory, | |
@@ -94,7 +94,7 @@ Spec = Gem::Specification.new do |s| | |
s.require_path = 'lib' | |
- # TODO / XXX - should we enable this? rubygems fails the install if anything | |
+ # TODO / XXX - should we enable this? rubygems fails the install if anything | |
# is broken. What we could do is CI submission, though, and always terminate | |
# with a positive code... | |
# s.test_file = "tests/testem.rb" | |
@@ -195,10 +195,10 @@ end | |
namespace :ext do | |
ext_sources = FileList['ext/*.{h,cpp,rb,c}'] | |
ffr_sources = FileList['ext/fastfilereader/*.{h,cpp,rb}'] | |
- | |
+ | |
desc "Build C++ extension" | |
task :build => [:make] | |
- | |
+ | |
desc "make extensions" | |
task :make => ext_sources + ['ext/Makefile'] do | |
chdir 'ext' do | |
@@ -210,7 +210,7 @@ namespace :ext do | |
sh MAKE | |
end | |
end | |
- | |
+ | |
desc 'Compile the makefile' | |
file 'ext/Makefile' => ext_sources do | |
chdir 'ext' do | |
@@ -231,22 +231,23 @@ namespace :java do | |
# This step is required before executing the jgem task. | |
desc "Build java extension" | |
task :build => [:jar] do |t| | |
- chdir('java/src') do | |
+ chdir('java') do | |
mv 'em_reactor.jar', '../../lib/em_reactor.jar' | |
end | |
end | |
- | |
+ | |
desc "compile .java to .class" | |
task :compile do | |
- chdir('java/src') do | |
- sh 'javac com/rubyeventmachine/*.java' | |
+ chdir('java') do | |
+ mkdir_p "target" | |
+ sh 'javac src/com/rubyeventmachine/*.java -d target' | |
end | |
end | |
- | |
+ | |
desc "compile .classes to .jar" | |
task :jar => [:compile] do | |
- chdir('java/src') do | |
- sh "jar -cf em_reactor.jar com/rubyeventmachine/*.class" | |
+ chdir('java') do | |
+ sh "jar -cf em_reactor.jar target/com/rubyeventmachine/*.class" | |
end | |
end | |
@@ -273,4 +274,4 @@ task :gemspec => :clobber do | |
end | |
task :clobber => :clean | |
-task :test => :build | |
\ No newline at end of file | |
+task :test => :build | |
-- | |
1.6.0.5 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment