summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2020-03-31 17:36:52 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2020-03-31 17:36:52 +0900
commit03ca90c732d4e2369d907d3b1b8d641ff4345f5a (patch)
treed4d106565f6ba391c1843f246ff912150be99a39
parentdad110d068960a22f3cadfeaf4d235e2585a143b (diff)
Share download cache with bundler
-rw-r--r--defs/gmake.mk6
-rw-r--r--template/Makefile.in1
2 files changed, 7 insertions, 0 deletions
diff --git a/defs/gmake.mk b/defs/gmake.mk
index cd72c49126..0b9d47a2ab 100644
--- a/defs/gmake.mk
+++ b/defs/gmake.mk
@@ -248,6 +248,12 @@ BUNDLED_GEMS := $(shell sed 's/[ ][ ]*/-/;s/[ ].*//' $(srcdir)/gems/bundled_g
update-gems: | $(patsubst %,gems/%.gem,$(BUNDLED_GEMS))
+test-bundler-precheck: | $(srcdir)/.bundle/cache
+
+$(srcdir)/.bundle/cache:
+ $(MAKEDIRS) $(@D)
+ $(LN_S) ../.downloaded-cache $@
+
gems/%.gem:
$(ECHO) Downloading bundled gem $*...
$(Q) $(BASERUBY) -C "$(srcdir)" \
diff --git a/template/Makefile.in b/template/Makefile.in
index c52783496b..a3b067b824 100644
--- a/template/Makefile.in
+++ b/template/Makefile.in
@@ -206,6 +206,7 @@ RM = rm -f
RMDIR = @RMDIR@
RMDIRS = @RMDIRS@
RMALL = @RMALL@
+LN_S = @LN_S@
NM = @NM@
AR = @AR@
ARFLAGS = @ARFLAGS@$(empty)