[macruby-changes] [2874] MacRuby/trunk
source_changes at macosforge.org
source_changes at macosforge.org
Tue Oct 20 20:17:54 PDT 2009
Revision: 2874
http://trac.macosforge.org/projects/ruby/changeset/2874
Author: lsansonetti at apple.com
Date: 2009-10-20 20:17:53 -0700 (Tue, 20 Oct 2009)
Log Message:
-----------
aot_compile_stdlib becomes stdlib:build + added stdlib:touch for lazy developers
Modified Paths:
--------------
MacRuby/trunk/Rakefile
MacRuby/trunk/rakelib/builder.rake
Modified: MacRuby/trunk/Rakefile
===================================================================
--- MacRuby/trunk/Rakefile 2009-10-21 03:16:49 UTC (rev 2873)
+++ MacRuby/trunk/Rakefile 2009-10-21 03:17:53 UTC (rev 2874)
@@ -46,7 +46,7 @@
task :clean => ['clean:local', 'clean:rbo', 'clean:ext']
desc "Build MacRuby and extensions"
-task :all => [:macruby, :aot_compile_stdlib, :extensions]
+task :all => [:macruby, 'stdlib:build', :extensions]
desc "Create an archive (GIT only)"
task :git_archive do
Modified: MacRuby/trunk/rakelib/builder.rake
===================================================================
--- MacRuby/trunk/rakelib/builder.rake 2009-10-21 03:16:49 UTC (rev 2873)
+++ MacRuby/trunk/rakelib/builder.rake 2009-10-21 03:17:53 UTC (rev 2874)
@@ -381,17 +381,25 @@
'lib/yaml.rb',
'lib/yaml/rubytypes.rb',
]
-desc "AOT compile parts of the stdlib"
-task :aot_compile_stdlib => [:miniruby, 'macruby:dylib'] do
- AOT_STDLIB.each do |pat|
- Dir.glob(pat).each do |path|
- out = File.join(File.dirname(path), File.basename(path, '.rb') + '.rbo')
- if !File.exist?(out) or File.mtime(path) > File.mtime(out) or File.mtime('./miniruby') > File.mtime(out)
- archf = ARCHS.map { |x| "--arch #{x}" }.join(' ')
- sh "./miniruby -I. -I./lib bin/rubyc --internal #{archf} -C \"#{path}\" -o \"#{out}\""
+namespace :stdlib do
+ desc "AOT compile the stdlib"
+ task :build => [:miniruby, 'macruby:dylib'] do
+ AOT_STDLIB.each do |pat|
+ Dir.glob(pat).each do |path|
+ out = File.join(File.dirname(path), File.basename(path, '.rb') + '.rbo')
+ if !File.exist?(out) or File.mtime(path) > File.mtime(out) or File.mtime('./miniruby') > File.mtime(out)
+ archf = ARCHS.map { |x| "--arch #{x}" }.join(' ')
+ sh "./miniruby -I. -I./lib bin/rubyc --internal #{archf} -C \"#{path}\" -o \"#{out}\""
+ end
end
end
- end
+ end
+
+ desc "Touch .rbo files to ignore their build"
+ task :touch do
+ files = ["*.rbo", "lib/**/*.rbo"]
+ files.each { |pat| Dir.glob(pat) }.flatten.each { |p| sh "/usr/bin/touch #{p}" }
+ end
end
desc "Same as extensions"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20091020/298c2c8a/attachment-0001.html>
More information about the macruby-changes
mailing list