Class: RubyWasm::BaseRubyProduct
- Inherits:
-
BuildProduct
- Object
- BuildProduct
- RubyWasm::BaseRubyProduct
- Defined in:
- lib/ruby_wasm/build/product/baseruby.rb
Instance Method Summary collapse
- #build(executor) ⇒ Object
-
#initialize(build_dir, source) ⇒ BaseRubyProduct
constructor
A new instance of BaseRubyProduct.
- #install_dir ⇒ Object
- #name ⇒ Object
- #product_build_dir ⇒ Object
Constructor Details
#initialize(build_dir, source) ⇒ BaseRubyProduct
Returns a new instance of BaseRubyProduct.
5 6 7 8 9 |
# File 'lib/ruby_wasm/build/product/baseruby.rb', line 5 def initialize(build_dir, source) @build_dir = build_dir @source = source @channel = source.name end |
Instance Method Details
#build(executor) ⇒ Object
23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/ruby_wasm/build/product/baseruby.rb', line 23 def build(executor) executor.mkdir_p product_build_dir @source.build(executor) return if Dir.exist?(install_dir) executor.system @source.configure_file, "--prefix=#{install_dir}", "--disable-install-doc", chdir: product_build_dir executor.system "make", "-j#{executor.process_count}", "install", chdir: product_build_dir end |
#install_dir ⇒ Object
15 16 17 |
# File 'lib/ruby_wasm/build/product/baseruby.rb', line 15 def install_dir File.join(product_build_dir, "opt") end |
#name ⇒ Object
19 20 21 |
# File 'lib/ruby_wasm/build/product/baseruby.rb', line 19 def name "baseruby-#{@channel}" end |
#product_build_dir ⇒ Object
11 12 13 |
# File 'lib/ruby_wasm/build/product/baseruby.rb', line 11 def product_build_dir File.join(@build_dir, RbConfig::CONFIG["host"], "baseruby-#{@channel}") end |