summaryrefslogtreecommitdiff
path: root/common.mk
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-09-24 10:07:21 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-09-24 10:07:21 +0000
commit444d0910056ce7f770b81f1bd50bbcbec85c3f37 (patch)
tree97983e25bad4de38c4c4ecafa5ff5bebc24302dd /common.mk
parent6aaa2ca5c5c1c7370c5ac4a2b42bae73b7fe56c2 (diff)
downloadruby-444d0910056ce7f770b81f1bd50bbcbec85c3f37.tar.gz
common.mk: force link exe/ruby
* common.mk (exe/ruby): force link exe/ruby with miniruby. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60012 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'common.mk')
-rw-r--r--common.mk10
1 files changed, 8 insertions, 2 deletions
diff --git a/common.mk b/common.mk
index 18c26ea9e8..cda48c8179 100644
--- a/common.mk
+++ b/common.mk
@@ -777,9 +777,15 @@ $(PLATFORM_D):
$(Q) $(MAKEDIRS) $(PLATFORM_DIR) $(@D)
@exit > $@
-exe/$(PROGRAM): ruby-runner.c ruby-runner.h exe/.time
+exe/$(PROGRAM): ruby-runner.c ruby-runner.h exe/.time miniruby$(EXEEXT)
$(Q) $(PURIFY) $(CC) $(CFLAGS) $(CPPFLAGS) -DRUBY_INSTALL_NAME=$(@F) $(LDFLAGS) $(LIBS) $(OUTFLAG)$@ $<
- $(Q) $(@) -e 'ARGV[0]=="ruby" or File.symlink(ARGV[0], ARGV[1]+"/ruby")' $(@F) $(@D)
+ $(Q) ./miniruby$(EXEEXT) \
+ -e 'prog, dest = ARGV; dest += "/ruby"' \
+ -e 'unless prog=="ruby"' \
+ -e ' begin File.unlink(dest); rescue Errno::ENOENT; end' \
+ -e ' File.symlink(prog, dest)' \
+ -e 'end' \
+ $(@F) $(@D)
exe/.time:
$(Q) $(MAKEDIRS) exe $(@D)