Skip to content

Commit

Permalink
Use extmk.rb to configure shared GC
Browse files Browse the repository at this point in the history
Since mkmf.rb is for extension libraries after installation, it cannot
work alone in build directory and needs to run from extmk.rb.
  • Loading branch information
nobu committed Nov 26, 2024
1 parent 9a5f6a4 commit d057503
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions common.mk
Original file line number Diff line number Diff line change
Expand Up @@ -1945,11 +1945,15 @@ HELP_EXTRA_TASKS = ""

shared-gc-precheck:
shared-gc: probes.h shared-gc-precheck
$(Q) $(MAKEDIRS) $(shared_gc_dir) .gc/$(arch)/$(SHARED_GC)
$(Q) $(RUNRUBY) -C .gc/$(arch)/$(SHARED_GC) $(CURDIR)/$(srcdir)/gc/$(SHARED_GC)/$(EXTCONF)
$(Q) $(CHDIR) .gc/$(arch)/$(SHARED_GC) && \
$(MAKE) extout=../../../$(EXTOUT) BUILTRUBY=../../../miniruby$(EXEEXT) && \
$(CP) librubygc.$(SHARED_GC).$(DLEXT) $(shared_gc_dir)
$(Q) $(MAKEDIRS) $(shared_gc_dir)
$(Q) $(RUNRUBY) $(srcdir)/ext/extmk.rb \
$(SCRIPT_ARGS) \
--make='$(MAKE)' --make-flags="V=$(V) MINIRUBY='$(MINIRUBY)'" \
--gnumake=$(gnumake) --extflags="$(EXTLDFLAGS)" \
--ext-build-dir=gc --command-output=gc/$(SHARED_GC)/exts.mk -- \
configure gc/$(SHARED_GC)
$(CHDIR) gc/$(SHARED_GC) && $(exec) $(MAKE) TARGET_SO_DIR=./
$(CP) gc/$(SHARED_GC)/librubygc.$(SHARED_GC).$(DLEXT) $(shared_gc_dir)

help: PHONY
$(MESSAGE_BEGIN) \
Expand Down

0 comments on commit d057503

Please sign in to comment.