зеркало из https://github.com/github/ruby.git
[Bug #19967] Reset `LIBPATHENV` env after started
Not to affect other tools invoked as child processes.
This commit is contained in:
Родитель
6d1ed3def8
Коммит
665b4c5b2a
|
@ -863,7 +863,8 @@ $(arch:noarch=ignore)-fake.rb: $(srcdir)/template/fake.rb.in $(tooldir)/generic_
|
|||
$(ECHO) generating $@
|
||||
$(Q) $(CPP) -DRUBY_EXPORT $(INCFLAGS) $(CPPFLAGS) "$(srcdir)/version.c" | \
|
||||
$(BOOTSTRAPRUBY) "$(tooldir)/generic_erb.rb" -o $@ "$(srcdir)/template/fake.rb.in" \
|
||||
i=- srcdir="$(srcdir)" BASERUBY="$(BASERUBY)"
|
||||
i=- srcdir="$(srcdir)" BASERUBY="$(BASERUBY)" \
|
||||
LIBPATHENV="$(LIBPATHENV)" PRELOADENV="$(PRELOADENV)" LIBRUBY_SO="$(LIBRUBY_SO)"
|
||||
|
||||
noarch-fake.rb: # prerequisite of yes-fake
|
||||
$(Q) exit > $@
|
||||
|
|
|
@ -127,6 +127,9 @@ BUILTIN_TRANSSRCS = @BUILTIN_TRANSSRCS@
|
|||
BUILTIN_TRANSOBJS = @BUILTIN_TRANSOBJS@
|
||||
POSTLINK = @POSTLINK@
|
||||
|
||||
LIBPATHENV = @LIBPATHENV@
|
||||
PRELOADENV = @PRELOADENV@
|
||||
|
||||
RUBY_BASE_NAME=@RUBY_BASE_NAME@
|
||||
RUBY_API_VERSION=@RUBY_API_VERSION@
|
||||
RUBY_INSTALL_NAME=@RUBY_INSTALL_NAME@
|
||||
|
|
|
@ -52,6 +52,9 @@ class Object
|
|||
% }
|
||||
end
|
||||
builddir = File.dirname(File.expand_path(__FILE__))
|
||||
libpathenv = libpathenv = "<%=arg['LIBPATHENV']%>"
|
||||
preloadenv = preloadenv = "<%=arg['PRELOADENV']%>"
|
||||
libruby_so = libruby_so = "<%=arg['LIBRUBY_SO']%>"
|
||||
srcdir = "<%=arg['srcdir']%>"
|
||||
top_srcdir = File.realpath(srcdir, builddir)
|
||||
fake = File.join(top_srcdir, "tool/fake.rb")
|
||||
|
|
|
@ -9,6 +9,14 @@ class File
|
|||
end
|
||||
end
|
||||
|
||||
[[libpathenv, "."], [preloadenv, libruby_so]].each do |env, path|
|
||||
env or next
|
||||
e = ENV[env] or next
|
||||
e = e.split(File::PATH_SEPARATOR)
|
||||
e.delete(File.expand_path(path, builddir)) or next
|
||||
ENV[env] = (e.join(File::PATH_SEPARATOR) unless e.empty?)
|
||||
end
|
||||
|
||||
static = !!(defined?($static) && $static)
|
||||
$:.unshift(builddir)
|
||||
posthook = proc do
|
||||
|
|
Загрузка…
Ссылка в новой задаче