зеркало из https://github.com/github/ruby.git
Fix dependencies of outdate-bundled-gems
Extract new gems then remove outdated gem directories.
This commit is contained in:
Родитель
aacaa2ec5e
Коммит
8e3ac264df
|
@ -1372,7 +1372,8 @@ update-config_files: PHONY
|
|||
|
||||
refresh-gems: update-bundled_gems prepare-gems
|
||||
prepare-gems: $(HAVE_BASERUBY:yes=update-gems) $(HAVE_BASERUBY:yes=extract-gems)
|
||||
extract-gems: $(HAVE_BASERUBY:yes=update-gems) $(DOT_WAIT) $(HAVE_BASERUBY:yes=outdate-bundled-gems)
|
||||
prepare-gems: $(DOT_WAIT) $(HAVE_BASERUBY:yes=outdate-bundled-gems)
|
||||
extract-gems: $(HAVE_BASERUBY:yes=update-gems)
|
||||
|
||||
update-gems$(gnumake:yes=-sequential): PHONY
|
||||
$(ECHO) Downloading bundled gem files...
|
||||
|
|
|
@ -284,9 +284,18 @@ bundled-gems := $(shell sed \
|
|||
bundled-gems-rev := $(filter-out $(subst |,,$(bundled-gems)),$(bundled-gems))
|
||||
bundled-gems := $(filter-out $(bundled-gems-rev),$(bundled-gems))
|
||||
|
||||
# calls $(1) with name, version, revision, URL
|
||||
foreach-bundled-gems-rev = \
|
||||
$(foreach g,$(bundled-gems-rev),$(call foreach-bundled-gems-rev-0,$(1),$(subst |, ,$(value g))))
|
||||
foreach-bundled-gems-rev-0 = \
|
||||
$(call $(1),$(word 1,$(2)),$(word 2,$(2)),$(word 3,$(2)),$(word 4,$(2)))
|
||||
bundled-gem-gemfile = $(srcdir)/gems/$(1)-$(2).gem
|
||||
bundled-gem-srcdir = $(srcdir)/gems/src/$(1)
|
||||
bundled-gem-extracted = $(srcdir)/.bundle/gems/$(1)-$(2)
|
||||
|
||||
update-gems: | $(patsubst %,$(srcdir)/gems/%.gem,$(bundled-gems))
|
||||
update-gems: | $(foreach g,$(bundled-gems-rev),$(srcdir)/gems/src/$(word 1,$(subst |, ,$(value g))))
|
||||
update-gems: | $(foreach g,$(bundled-gems-rev),$(srcdir)/gems/$(word 1,$(subst |, ,$(value g)))-$(word 2,$(subst |, ,$(value g))).gem)
|
||||
update-gems: | $(call foreach-bundled-gems-rev,bundled-gem-gemfile)
|
||||
update-gems: | $(call foreach-bundled-gems-rev,bundled-gem-srcdir)
|
||||
|
||||
test-bundler-precheck: | $(srcdir)/.bundle/cache
|
||||
|
||||
|
@ -306,8 +315,7 @@ $(srcdir)/gems/%.gem:
|
|||
-e 'FileUtils.rm_rf(old.map{'"|n|"'n.chomp(".gem")})'
|
||||
|
||||
extract-gems: | $(patsubst %,$(srcdir)/.bundle/gems/%,$(bundled-gems))
|
||||
extract-gems: | $(foreach g,$(bundled-gems-rev), \
|
||||
$(srcdir)/.bundle/gems/$(word 1,$(subst |, ,$(value g)))-$(word 2,$(subst |, ,$(value g))))
|
||||
extract-gems: | $(call foreach-bundled-gems-rev,bundled-gem-extracted)
|
||||
|
||||
$(srcdir)/.bundle/gems/%: $(srcdir)/gems/%.gem | .bundle/gems
|
||||
$(ECHO) Extracting bundle gem $*...
|
||||
|
@ -332,10 +340,10 @@ $(srcdir)/.bundle/gems/$(1)-$(2): | $(srcdir)/gems/src/$(1) .bundle/gems
|
|||
|
||||
endef
|
||||
define copy-gem-0
|
||||
$(call copy-gem,$(word 1,$(1)),$(word 2,$(1)),$(word 3,$(1)),$(word 4,$(1)))
|
||||
$(eval $(call copy-gem,$(1),$(2),$(3),$(4)))
|
||||
endef
|
||||
|
||||
$(foreach g,$(bundled-gems-rev),$(eval $(call copy-gem-0,$(subst |, ,$(value g)))))
|
||||
$(call foreach-bundled-gems-rev,copy-gem-0)
|
||||
|
||||
$(srcdir)/gems/src:
|
||||
$(MAKEDIRS) $@
|
||||
|
|
Загрузка…
Ссылка в новой задаче