From b1be349bfb327753d9f971c9ef692896fac7df08 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Tue, 9 Jul 2019 21:21:00 +0900 Subject: [PATCH] Make symlink to "ruby" only from the install-name --- common.mk | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/common.mk b/common.mk index 928c595ea5..8f123e54c6 100755 --- a/common.mk +++ b/common.mk @@ -867,12 +867,13 @@ exe/$(PROGRAM): ruby-runner.c ruby-runner.h exe/.time miniruby$(EXEEXT) {$(VPATH $(Q) $(PURIFY) $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) $(OUTFLAG)$@ ruby-runner.$(OBJEXT) $(LIBS) $(Q) $(POSTLINK) $(Q) ./miniruby$(EXEEXT) \ - -e 'prog, dest = ARGV; dest += "/ruby"' \ + -e 'prog, dest, inst = ARGV; dest += "/ruby"' \ + -e 'exit unless prog==inst' \ -e 'unless prog=="ruby"' \ -e ' begin File.unlink(dest); rescue Errno::ENOENT; end' \ -e ' File.symlink(prog, dest)' \ -e 'end' \ - $(@F) $(@D) + $(@F) $(@D) $(RUBY_INSTALL_NAME)$(EXEEXT) exe/.time: $(Q) $(MAKEDIRS) $(@D)