Split modular-gc into build and installation

This commit is contained in:
Nobuyoshi Nakada 2024-12-20 16:44:27 +09:00
parent 2f2530b195
commit 4fb5d746ce
No known key found for this signature in database
GPG Key ID: 3582D74E1FEE4465
Notes: git 2024-12-22 13:42:57 +00:00
3 changed files with 14 additions and 7 deletions

View File

@ -132,7 +132,7 @@ jobs:
- name: Build Modular GC
run: |
echo "RUBY_GC_LIBRARY=${{ matrix.gc.name }}" >> $GITHUB_ENV
make modular-gc MODULAR_GC=${{ matrix.gc.name }} MMTK_BUILD=${{ matrix.gc.mmtk_build }}
make install-modular-gc MODULAR_GC=${{ matrix.gc.name }} MMTK_BUILD=${{ matrix.gc.mmtk_build }}
make distclean-modular-gc MODULAR_GC=${{ matrix.gc.name }}
- run: |

View File

@ -1941,9 +1941,18 @@ rewindable:
HELP_EXTRA_TASKS = ""
gc/Makefile:
$(MAKEDIRS) $(@D)
$(MESSAGE_BEGIN) \
"all:" \
" @echo You must specify MODULAR_GC with the GC to build" \
" @exit 1" \
$(MESSAGE_END) > $@
gc/distclean gc/realclean::
-$(Q) $(RM) gc/Makefile
modular-gc-precheck:
modular-gc: probes.h modular-gc-precheck
$(Q) $(MAKEDIRS) $(modular_gc_dir)
modular-gc: probes.h gc/Makefile
$(Q) $(RUNRUBY) $(srcdir)/ext/extmk.rb \
$(SCRIPT_ARGS) \
--make='$(MAKE)' --make-flags="V=$(V) MINIRUBY='$(MINIRUBY)'" \
@ -1951,6 +1960,8 @@ modular-gc: probes.h modular-gc-precheck
--ext-build-dir=gc --command-output=gc/$(MODULAR_GC)/exts.mk -- \
configure gc/$(MODULAR_GC)
$(CHDIR) gc/$(MODULAR_GC) && $(exec) $(MAKE) TARGET_SO_DIR=./
install-modular-gc: modular-gc modular-gc-precheck
$(Q) $(MAKEDIRS) $(modular_gc_dir)
$(CP) gc/$(MODULAR_GC)/librubygc.$(MODULAR_GC).$(DLEXT) $(modular_gc_dir)
clean-modular-gc: gc/clean

View File

@ -353,10 +353,6 @@ modular-gc-precheck:
echo "You must configure with --with-modular-gc to use modular GC"; \
exit 1; \
fi
$(Q) if test -z $(MODULAR_GC); then \
echo "You must specify MODULAR_GC with the GC to build"; \
exit 1; \
fi
pre-install-local:: pkgconfig-data