Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

aot_compile_stdlib becomes stdlib:build + added stdlib:touch for lazy…

… developers

git-svn-id: http://svn.macosforge.org/repository/ruby/MacRuby/trunk@2874 23306eb0-4c56-4727-a40e-e92c0eb68959
  • Loading branch information...
commit 96df0a79ce5ca39992c46129b0d7dcf779f1d441 1 parent e46d13c
Laurent Sansonetti authored
Showing with 18 additions and 10 deletions.
  1. +1 −1  Rakefile
  2. +17 −9 rakelib/builder.rake
View
2  Rakefile
@@ -46,7 +46,7 @@ desc "Clean local and extension build files"
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
View
26 rakelib/builder.rake
@@ -381,17 +381,25 @@ AOT_STDLIB = [
'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"
Please sign in to comment.
Something went wrong with that request. Please try again.