[macruby-changes] [3554] MacRuby/trunk/bin

source_changes at macosforge.org source_changes at macosforge.org
Tue Feb 16 13:53:11 PST 2010


Revision: 3554
          http://trac.macosforge.org/projects/ruby/changeset/3554
Author:   martinlagardette at apple.com
Date:     2010-02-16 13:53:09 -0800 (Tue, 16 Feb 2010)
Log Message:
-----------

 - Moving the use of ENV['ARCHS'] to ruby_deploy

Modified Paths:
--------------
    MacRuby/trunk/bin/ruby_deploy
    MacRuby/trunk/bin/rubyc

Modified: MacRuby/trunk/bin/ruby_deploy
===================================================================
--- MacRuby/trunk/bin/ruby_deploy	2010-02-16 21:34:51 UTC (rev 3553)
+++ MacRuby/trunk/bin/ruby_deploy	2010-02-16 21:53:09 UTC (rev 3554)
@@ -93,7 +93,10 @@
       next if base == 'rb_main'
       obj = File.join(File.dirname(source), base + '.rbo')
       if !File.exist?(obj) or File.mtime(source) > File.mtime(obj)
-        execute("macrubyc -C \"#{source}\" -o \"#{obj}\"", "Can't compile \"#{source}\"")
+        compile_cmd = "macrubyc -C \"#{source}\" -o \"#{obj}\""
+        # Use Xcode ARCHS env var to determine which archs to compile for
+        compile_cmd += ENV['ARCHS'].strip.split.map { |a| " -a #{a}" }.join if ENV['ARCHS']
+        execute(compile_cmd, "Can't compile \"#{source}\"")
       end
       rm_rf(source)
     end

Modified: MacRuby/trunk/bin/rubyc
===================================================================
--- MacRuby/trunk/bin/rubyc	2010-02-16 21:34:51 UTC (rev 3553)
+++ MacRuby/trunk/bin/rubyc	2010-02-16 21:53:09 UTC (rev 3554)
@@ -41,17 +41,7 @@
         die "Invalid mode `#{@mode}'. Possible choices are: normal, full"
       end
       @archs.uniq!
-      if @archs.empty?
-        arch = ENV['ARCHS']
-        arch = arch.strip if arch
-        if arch and arch.size > 0
-          # Copy Xcode way of doing it:
-          # Use intersection of ARCHS and VALID_ARCHS
-          @archs = arch.split & VALID_ARCHS
-        else
-          @archs << RUBY_ARCH
-        end
-      end
+      @archs << RUBY_ARCH if @archs.empty?
       @archs.each do |arch|
         if not VALID_ARCHS.include?(arch)
           die "Invalid CPU architecture `#{arch}'. Possible values are: " + VALID_ARCHS.join(", ")
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20100216/fbe4410f/attachment.html>


More information about the macruby-changes mailing list