diff --git a/common.mk b/common.mk index 72e58ddb3e..ecdcf6c544 100644 --- a/common.mk +++ b/common.mk @@ -1943,14 +1943,8 @@ rewindable: HELP_EXTRA_TASKS = "" -shared-gc: probes.h - $(Q) if test -z $(shared_gc_dir); then \ - echo "You must configure with --with-shared-gc to use shared GC"; \ - exit 1; \ - elif test -z $(SHARED_GC); then \ - echo "You must specify SHARED_GC with the GC to build"; \ - exit 1; \ - fi +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) && \ diff --git a/template/Makefile.in b/template/Makefile.in index c4e2d6d542..78ebe8a338 100644 --- a/template/Makefile.in +++ b/template/Makefile.in @@ -348,6 +348,16 @@ $(ruby_pc): config.status Makefile $(Q)pkg_config=${PKG_CONFIG} && PKG_CONFIG_PATH=. $${pkg_config:-:} --print-errors ruby.tmp $(Q)$(MV) -f ruby.tmp.pc $(ruby_pc) +shared-gc-precheck: + $(Q) if test -z $(shared_gc_dir); then \ + echo "You must configure with --with-shared-gc to use shared GC"; \ + exit 1; \ + fi + $(Q) if test -z $(SHARED_GC); then \ + echo "You must specify SHARED_GC with the GC to build"; \ + exit 1; \ + fi + pre-install-local:: pkgconfig-data ruby-runner.h: template/ruby-runner.h.in config.status