rename ruby-runner as bin/ruby

* Makefile.in, configure.in, tool/runruby.rb: rename ruby-runner
  executable file as $(RUBY_INSTALL_NAME) under bin, to mimic
  dirty `#!/usr/bin/env` hack.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59927 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2017-09-15 17:42:00 +00:00
Родитель b2996b30d9
Коммит 86888f9cec
7 изменённых файлов: 12 добавлений и 9 удалений

1
.gitattributes поставляемый
Просмотреть файл

@ -1,5 +1,6 @@
*.gemspec diff=ruby
*.rb diff=ruby
bin svn-properties=svn:ignore=ruby
bin/* diff=ruby
tool/update-deps diff=ruby
tool/make-snapshot diff=ruby

2
.gitignore поставляемый
Просмотреть файл

@ -130,6 +130,8 @@ lcov*.info
/benchmark/fasta.output.*
/benchmark/wc.input
/bin/ruby
/enc/*.def
/enc/*.exp
/enc/*.lib

Просмотреть файл

@ -265,7 +265,7 @@ $(ruby_pc):
ruby-runner.h: template/ruby-runner.h.in
@./config.status --file=$@:$(srcdir)/template/$(@F).in
ruby-runner$(EXEEXT): ruby-runner.c ruby-runner.h
bin/$(PROGRAM): ruby-runner.c ruby-runner.h
$(Q) $(PURIFY) $(CC) $(CFLAGS) $(CPPFLAGS) -DRUBY_INSTALL_NAME=$(RUBY_INSTALL_NAME) $(LDFLAGS) $(LIBS) $(OUTFLAG)$@ $<
$(RBCONFIG): $(PREP)
@ -417,7 +417,7 @@ clean-local::
$(Q)$(RM) ext/extinit.c ext/extinit.$(OBJEXT) ext/ripper/y.output \
enc/encinit.c enc/encinit.$(OBJEXT)
-$(Q)$(RM) $(pkgconfig_DATA)
-$(Q)$(RMALL) ruby-runner$(EXEEXT) ruby-runner.h *.dSYM
-$(Q)$(RMALL) bin/$(PROGRAM) ruby-runner.h *.dSYM
distclean-local::
$(Q)$(RM) ext/config.cache $(RBCONFIG) Doxyfile

Просмотреть файл

@ -4028,7 +4028,7 @@ AS_CASE("$cross_compiling:${LIBPATHENV}", [yes:* | no:], [], [
AC_MSG_CHECKING(whether wrapper for $LIBPATHENV is needed)
AS_IF([env ${LIBPATHENV}=/lib /bin/sh -c ': ${'${LIBPATHENV}'?}' 2>/dev/null],
[AC_MSG_RESULT(no)],
[PREP="$PREP"' ruby-runner$(EXEEXT)'
[PREP="$PREP"' bin/$(PROGRAM)'
AC_MSG_RESULT(yes)]
)
])

Просмотреть файл

@ -46,8 +46,8 @@ module DTrace
IO.popen(cmd, err: [:child, :out], &:readlines)
end
exeext = Regexp.quote(RbConfig::CONFIG["EXEEXT"])
RUBYBIN = EnvUtil.rubybin.sub(/\/ruby-runner(?=#{exeext}\z)/, '/miniruby')
miniruby = "#{RbConfig::TOPDIR}/miniruby#{RbConfig::CONFIG["EXEEXT"]}"
RUBYBIN = File.exist?(miniruby) ? miniruby : EnvUtil.rubybin
def trap_probe d_program, ruby_program
d = Tempfile.new(%w'probe .d')

Просмотреть файл

@ -115,8 +115,8 @@ rubyw_install_name = config["rubyw_install_name"]
goruby_install_name = "go" + ruby_install_name
[ruby_install_name, rubyw_install_name, goruby_install_name].map do |ruby|
ruby += exeext
if ruby and !ruby.empty?
ln_relative(ruby, "#{bindir}/#{ruby}")
if ruby and !ruby.empty? and !File.file?(target = "#{bindir}/#{ruby}")
ln_relative(ruby, target)
end
end
so = config["LIBRUBY_SO"]

Просмотреть файл

@ -74,14 +74,14 @@ env = {
'RUBY_FIBER_MACHINE_STACK_SIZE' => '1',
}
runner = File.join(abs_archdir, "ruby-runner#{config['EXEEXT']}")
runner = File.join(abs_archdir, "bin/ruby#{config['EXEEXT']}")
runner = nil unless File.exist?(runner)
abs_ruby = runner || File.expand_path(ruby)
env["RUBY"] = abs_ruby
env["GEM_PATH"] = env["GEM_HOME"] = File.expand_path("spec/rspec", srcdir)
env["BUNDLE_RUBY"] = abs_ruby
env["BUNDLE_GEM"] = "#{abs_ruby} -rrubygems #{srcdir}/bin/gem --backtrace"
env["PATH"] = [abs_archdir, ENV["PATH"]].compact.join(File::PATH_SEPARATOR)
env["PATH"] = [File.dirname(abs_ruby), abs_archdir, ENV["PATH"]].compact.join(File::PATH_SEPARATOR)
if e = ENV["RUBYLIB"]
libs |= e.split(File::PATH_SEPARATOR)