File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change 9
9
10
10
makefile = File . read ( "Makefile" )
11
11
12
- # Modify the `all` target to run the `mmtk` target first
13
- makefile . gsub! ( /^all:\s +(.*)$/ , 'all: mmtk \1' )
12
+ makefile . prepend ( "MMTK_BUILD=debug\n " )
14
13
15
- # Add the `mmtk` target to run `cargo build`
16
- makefile << <<~'MAKEFILE'
17
- $(srcdir)/mmtk.c: mmtk
14
+ # Add `libmmtk_ruby.a` as an object file
15
+ makefile . gsub! ( /^OBJS = (.*)$/ , "OBJS = \\ 1 $(MMTK_BUILD)/libmmtk_ruby.#{ RbConfig ::CONFIG [ "LIBEXT" ] } " )
18
16
19
- MMTK_BUILD=debug
17
+ # Modify the `all` target to run the `libmmtk_ruby.a` target first
18
+ makefile . gsub! ( /^all:\s +(.*)$/ , "all: $(MMTK_BUILD)/libmmtk_ruby.#{ RbConfig ::CONFIG [ "LIBEXT" ] } \\ 1" )
20
19
21
- .PHONY: mmtk
22
- mmtk:
20
+ # Add the `libmmtk_ruby.a` target to run `cargo build`
21
+ makefile << <<~MAKEFILE
22
+ $(MMTK_BUILD)/libmmtk_ruby.#{ RbConfig ::CONFIG [ "LIBEXT" ] } : $(wildcard $(srcdir)/src/*.rs) $(srcdir)/Cargo.toml $(srcdir)/Cargo.toml
23
23
$(Q) case $(MMTK_BUILD) in \
24
24
release) \
25
25
CARGO_TARGET_DIR="." cargo build --manifest-path=$(srcdir)/Cargo.toml --release \
You can’t perform that action at this time.
0 commit comments