[ruby/mmtk] Fix libmmtk_ruby.a building in extconf.rb
Since libmmtk_ruby.a was a PHONY target, it caused the shared object to not be rebuilt even though libmmtk_ruby.a was updated. https://github.com/ruby/mmtk/commit/076f0a97a6
This commit is contained in:
parent
5fab31b15e
commit
2da91080d3
@ -9,17 +9,17 @@ create_gc_makefile("mmtk")
|
||||
|
||||
makefile = File.read("Makefile")
|
||||
|
||||
# Modify the `all` target to run the `mmtk` target first
|
||||
makefile.gsub!(/^all:\s+(.*)$/, 'all: mmtk \1')
|
||||
makefile.prepend("MMTK_BUILD=debug\n")
|
||||
|
||||
# Add the `mmtk` target to run `cargo build`
|
||||
makefile << <<~'MAKEFILE'
|
||||
$(srcdir)/mmtk.c: mmtk
|
||||
# Add `libmmtk_ruby.a` as an object file
|
||||
makefile.gsub!(/^OBJS = (.*)$/, "OBJS = \\1 $(MMTK_BUILD)/libmmtk_ruby.#{RbConfig::CONFIG["LIBEXT"]}")
|
||||
|
||||
MMTK_BUILD=debug
|
||||
# Modify the `all` target to run the `libmmtk_ruby.a` target first
|
||||
makefile.gsub!(/^all:\s+(.*)$/, "all: $(MMTK_BUILD)/libmmtk_ruby.#{RbConfig::CONFIG["LIBEXT"]} \\1")
|
||||
|
||||
.PHONY: mmtk
|
||||
mmtk:
|
||||
# Add the `libmmtk_ruby.a` target to run `cargo build`
|
||||
makefile << <<~MAKEFILE
|
||||
$(MMTK_BUILD)/libmmtk_ruby.#{RbConfig::CONFIG["LIBEXT"]}: $(wildcard $(srcdir)/src/*.rs) $(srcdir)/Cargo.toml $(srcdir)/Cargo.toml
|
||||
$(Q) case $(MMTK_BUILD) in \
|
||||
release) \
|
||||
CARGO_TARGET_DIR="." cargo build --manifest-path=$(srcdir)/Cargo.toml --release \
|
||||
|
Loading…
x
Reference in New Issue
Block a user