summaryrefslogtreecommitdiff
path: root/common.mk
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2022-11-21 15:10:29 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2022-11-21 15:10:29 +0900
commit166598a6eb0108d41874fd3dbe4d2c2af8cfea71 (patch)
tree8af47389882eb3b842defcf1223511bcd7099714 /common.mk
parent427985c194a3fcbb5ecfd44565ea6e9d63fd647a (diff)
downloadruby-166598a6eb0108d41874fd3dbe4d2c2af8cfea71.tar.gz
Add outdate-bundled-gems target [ci skip]
Diffstat (limited to 'common.mk')
-rw-r--r--common.mk11
1 files changed, 11 insertions, 0 deletions
diff --git a/common.mk b/common.mk
index 056d3d4cd2..7390b9289f 100644
--- a/common.mk
+++ b/common.mk
@@ -1400,6 +1400,17 @@ extract-gems$(gnumake:yes=-sequential): PHONY
-e 'end' \
gems/bundled_gems
+extract-gems: outdate-bundled-gems
+outdate-bundled-gems: PHONY
+ $(Q) $(BASERUBY) -C "$(srcdir)" \
+ -rfileutils \
+ -e 'Dir.glob(".bundle/gems/*/") {|g|' \
+ -e 'FileUtils::Verbose.rm_rf(g) unless File.exist?("gems/#{File.basename(g)}.gem")' \
+ -e '}' \
+ -e 'Dir.glob(".bundle/specifications/*.gemspec") {|g|' \
+ -e 'FileUtils::Verbose.rm_f(g) unless File.exist?("gems/#{File.basename(g, ".gemspec")}.gem")' \
+ -e '}'
+
update-bundled_gems: PHONY
$(Q) $(RUNRUBY) -rrubygems \
$(tooldir)/update-bundled_gems.rb \