[macruby-changes] [4708] DietRB/trunk/Rakefile
source_changes at macosforge.org
source_changes at macosforge.org
Fri Oct 8 04:02:44 PDT 2010
Revision: 4708
http://trac.macosforge.org/projects/ruby/changeset/4708
Author: eloy.de.enige at gmail.com
Date: 2010-10-08 04:02:43 -0700 (Fri, 08 Oct 2010)
Log Message:
-----------
Add a task to merge the source into the MacRuby repo
From: Eloy Duran <eloy.de.enige at gmail.com>
Modified Paths:
--------------
DietRB/trunk/Rakefile
Modified: DietRB/trunk/Rakefile
===================================================================
--- DietRB/trunk/Rakefile 2010-10-08 11:02:35 UTC (rev 4707)
+++ DietRB/trunk/Rakefile 2010-10-08 11:02:43 UTC (rev 4708)
@@ -15,18 +15,39 @@
sh "#{ruby_bin} -I lib ./bin/dietrb -r irb/ext/colorize -r pp"
end
-desc "AOT compile for MacRuby"
-task :macruby_compile do
- FileList["lib/**/*.rb"].each do |source|
- sh "macrubyc --arch i386 --arch x86_64 -C '#{source}' -o '#{source}o'"
+namespace :macruby do
+ desc "AOT compile for MacRuby"
+ task :compile do
+ FileList["lib/**/*.rb"].each do |source|
+ sh "macrubyc --arch i386 --arch x86_64 -C '#{source}' -o '#{source}o'"
+ end
end
-end
-
-desc "Clean MacRuby binaries"
-task :clean do
- FileList["lib/**/*.rbo"].each do |bin|
- rm bin
+
+ desc "Clean MacRuby binaries"
+ task :clean do
+ FileList["lib/**/*.rbo"].each do |bin|
+ rm bin
+ end
end
+
+ desc "Merge source into the MacRuby repo"
+ task :merge do
+ if (repo = ENV['macruby_repo']) && File.exist?(repo)
+ bin = File.join(repo, 'bin/irb')
+ lib = File.join(repo, 'lib')
+
+ rm_f bin
+ rm_f File.join(lib, 'irb.rb')
+ rm_rf File.join(lib, 'irb')
+
+ cp 'bin/dietrb', bin
+ cp 'lib/irb.rb', lib
+ cp_r 'lib/irb', lib
+ else
+ puts "[!] Set the `macruby_repo' env variable to point to the MacRuby repo checkout"
+ exit 1
+ end
+ end
end
begin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20101008/6e6188fa/attachment.html>
More information about the macruby-changes
mailing list