summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2025-07-25 09:37:00 +0900
committerNobuyoshi Nakada <nobu.nakada@gmail.com>2025-07-25 17:06:48 +0900
commit199861424e6eab7dc292b8d06d709b4c02c80347 (patch)
treed4b088ca0347b138a6f0d6ee0aafefcb9fc3ffe8
parentbcce142878e6897bc1ca8c9c5449f8c9173c2c95 (diff)
Flush out-of-date gems at extracting bundled gems
-rw-r--r--common.mk7
1 files changed, 6 insertions, 1 deletions
diff --git a/common.mk b/common.mk
index 896005e76e..44d4ae93a1 100644
--- a/common.mk
+++ b/common.mk
@@ -1531,8 +1531,12 @@ update-coverage: main PHONY
--install-dir .bundle --conservative "simplecov"
refresh-gems: update-bundled_gems prepare-gems
+# can't recall exactly, but `make` somewhere (not GNU or nmake)
+# couldn't handle spaces in replacement strings; i.e.,
+# `$(HAVE_BASERUBY:yes=word word ...)` didn't work.
prepare-gems: $(HAVE_BASERUBY:yes=update-gems) $(HAVE_BASERUBY:yes=extract-gems)
-extract-gems: $(HAVE_BASERUBY:yes=update-gems)
+extract-gems: $(HAVE_BASERUBY:yes=update-gems) $(HAVE_BASERUBY:yes=outdate-bundled-gems)
+update-gems: $(HAVE_BASERUBY:yes=outdate-bundled-gems)
update-gems$(sequential): PHONY
$(ECHO) Downloading bundled gem files...
@@ -1566,6 +1570,7 @@ extract-gems$(sequential): PHONY
extract-gems$(sequential): $(HAVE_GIT:yes=clone-bundled-gems-src)
+flush-gems: outdate-bundled-gems
outdate-bundled-gems: PHONY
$(Q) $(BASERUBY) $(tooldir)/$@.rb --make="$(MAKE)" --mflags="$(MFLAGS)" \
--ruby-platform=$(arch) --ruby-version=$(ruby_version) \