[macruby-changes] [5035] MacRuby/trunk
source_changes at macosforge.org
source_changes at macosforge.org
Wed Dec 15 18:37:18 PST 2010
Revision: 5035
http://trac.macosforge.org/projects/ruby/changeset/5035
Author: lsansonetti at apple.com
Date: 2010-12-15 18:37:14 -0800 (Wed, 15 Dec 2010)
Log Message:
-----------
do not build libmacruby-static anymore (by default)
Modified Paths:
--------------
MacRuby/trunk/bin/rubyc
MacRuby/trunk/instruby.rb
MacRuby/trunk/rakelib/builder/options.rb
MacRuby/trunk/rakelib/builder/templates.rb
MacRuby/trunk/rakelib/builder.rake
Modified: MacRuby/trunk/bin/rubyc
===================================================================
--- MacRuby/trunk/bin/rubyc 2010-12-16 01:28:17 UTC (rev 5034)
+++ MacRuby/trunk/bin/rubyc 2010-12-16 02:37:14 UTC (rev 5035)
@@ -52,6 +52,9 @@
if @sdk and !File.exist?(@sdk)
die "Given SDK path `#{@sdk}' doesn't exist."
end
+ if @static and RbConfig::CONFIG['ENABLE_STATIC'] != 'yes'
+ die "This version of MacRuby does not support static compilation."
+ end
@frameworks.uniq!
end
Modified: MacRuby/trunk/instruby.rb
===================================================================
--- MacRuby/trunk/instruby.rb 2010-12-16 01:28:17 UTC (rev 5034)
+++ MacRuby/trunk/instruby.rb 2010-12-16 02:37:14 UTC (rev 5035)
@@ -250,7 +250,9 @@
install dll, bindir, :mode => $prog_mode
end
install lib, libdir, :mode => $prog_mode, :strip => true
- install arc, libdir, :mode => $data_mode, :strip => true
+ if enable_static
+ install arc, libdir, :mode => $data_mode, :strip => true
+ end
install "rbconfig.rb", archlibdir, :mode => $data_mode
install "rbconfig.rbo", archlibdir, :mode => $data_mode
if CONFIG["ARCHFILE"]
Modified: MacRuby/trunk/rakelib/builder/options.rb
===================================================================
--- MacRuby/trunk/rakelib/builder/options.rb 2010-12-16 01:28:17 UTC (rev 5034)
+++ MacRuby/trunk/rakelib/builder/options.rb 2010-12-16 02:37:14 UTC (rev 5035)
@@ -41,7 +41,7 @@
FRAMEWORK_NAME = b.option('framework_name', 'MacRuby')
FRAMEWORK_INSTDIR = b.option('framework_instdir', '/Library/Frameworks')
SYM_INSTDIR = b.option('sym_instdir', '/usr/local')
-ENABLE_STATIC_LIBRARY = b.option('enable_static_library', 'no') { 'yes' }
+ENABLE_STATIC_LIBRARY = b.option('enable_static_library', false) { |x| x == 'true' }
ENABLE_DEBUG_LOGGING = b.option('enable_debug_logging', true) { |x| x == 'true' }
SIMULTANEOUS_JOBS = b.option('jobs', 1) { |x| x.to_i }
COMPILE_STDLIB = b.option('compile_stdlib', true) { |x| x == 'true' }
Modified: MacRuby/trunk/rakelib/builder/templates.rb
===================================================================
--- MacRuby/trunk/rakelib/builder/templates.rb 2010-12-16 01:28:17 UTC (rev 5034)
+++ MacRuby/trunk/rakelib/builder/templates.rb 2010-12-16 02:37:14 UTC (rev 5035)
@@ -182,7 +182,7 @@
CONFIG["SOLIBS"] = ""
CONFIG["DLDLIBS"] = ""
CONFIG["ENABLE_SHARED"] = "yes"
- CONFIG["ENABLE_STATIC"] = "#{ENABLE_STATIC_LIBRARY}"
+ CONFIG["ENABLE_STATIC"] = "#{ENABLE_STATIC_LIBRARY ? 'yes' : 'no'}"
CONFIG["MAINLIBS"] = ""
CONFIG["COMMON_LIBS"] = ""
CONFIG["COMMON_MACROS"] = ""
Modified: MacRuby/trunk/rakelib/builder.rake
===================================================================
--- MacRuby/trunk/rakelib/builder.rake 2010-12-16 01:28:17 UTC (rev 5034)
+++ MacRuby/trunk/rakelib/builder.rake 2010-12-16 02:37:14 UTC (rev 5035)
@@ -100,9 +100,11 @@
desc "Build static library"
task :static => :files do
- $builder.config = STATIC_CONFIG
- build_objects
- $builder.link_archive("lib#{RUBY_SO_NAME}-static.a", $builder.objs - ['main', 'gc-stub'])
+ if ENABLE_STATIC_LIBRARY
+ $builder.config = STATIC_CONFIG
+ build_objects
+ $builder.link_archive("lib#{RUBY_SO_NAME}-static.a", $builder.objs - ['main', 'gc-stub'])
+ end
end
desc "Build MacRuby"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20101215/f2ccaa49/attachment-0001.html>
More information about the macruby-changes
mailing list