lib/autobuild/packages/ruby.rb in autobuild-1.8.3 vs lib/autobuild/packages/ruby.rb in autobuild-1.9.0.b1
- old
+ new
@@ -45,24 +45,28 @@
:working_directory => srcdir
end
end
end
+ def invoke_rake(setup_task = rake_setup_task)
+ if setup_task && File.file?(File.join(srcdir, 'Rakefile'))
+ Autobuild::Subprocess.run self, 'post-install',
+ Autobuild.tool_in_path('ruby'), '-S', Autobuild.tool('rake'), setup_task,
+ :working_directory => srcdir
+ end
+ end
+
def install
progress_start "setting up Ruby package %s", :done_message => 'set up Ruby package %s' do
Autobuild.update_environment srcdir
# Add lib/ unconditionally, as we know that it is a ruby package.
# update_environment will add it only if there is a .rb file in the directory
libdir = File.join(srcdir, 'lib')
if File.directory?(libdir)
Autobuild.env_add_path 'RUBYLIB', libdir
end
- if rake_setup_task && File.file?(File.join(srcdir, 'Rakefile'))
- Autobuild::Subprocess.run self, 'post-install',
- Autobuild.tool_in_path('ruby'), '-S', Autobuild.tool('rake'), rake_setup_task,
- :working_directory => srcdir
- end
+ invoke_rake
end
super
end
def prepare_for_forced_build # :nodoc: