1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Make symlink to "ruby" only from the install-name

This commit is contained in:
Nobuyoshi Nakada 2019-07-09 21:21:00 +09:00
parent 9f275f7971
commit b1be349bfb
No known key found for this signature in database
GPG key ID: 4BC7D6DF58D8DF60

View file

@ -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)