mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00

- Split static recipes to depend file. - Modify makefile configurations in the block to `create_makefile`. - Expand rust sources in extconf.rb instead of GNU make extension. TODO: pass `CARGO_TARGET_DIR` without shell syntax.
20 lines
429 B
Ruby
20 lines
429 B
Ruby
# frozen_string_literal: true
|
|
|
|
require_relative "../extconf_base"
|
|
|
|
# Statically link `libmmtk_ruby.a`
|
|
$LIBS << " $(MMTK_BUILD)/$(LIBMMTK_RUBY)"
|
|
|
|
rustsrcs = Dir.glob("src/*.rs", base: __dir__).map {|s| "$(srcdir)/#{s}"}
|
|
|
|
create_gc_makefile("mmtk") do |makefile|
|
|
[
|
|
*makefile,
|
|
|
|
<<~MAKEFILE,
|
|
MMTK_BUILD = debug
|
|
LIBMMTK_RUBY = libmmtk_ruby.#$LIBEXT
|
|
RUSTSRCS = #{rustsrcs.join(" \\\n\t ")}
|
|
MAKEFILE
|
|
]
|
|
end
|