Skip colliding filenames in LIBRUBY_ALIASES
This allows user to specify any name in `--with-so-name` that might cause a name clash with LIBRUBY_ALIASES on the platform. Without this, for example, configuring with `--with-soname=ruby --enable-shared` on macOS would end up running `ln -sf libruby.dylib libruby.dylib` only to fail with the following error in installation: ``` make[2]: stat: libruby.dylib: Too many levels of symbolic links ``` git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63544 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
ce2f4f8526
commit
6251615c12
@ -272,9 +272,9 @@ $(LIBRUBY_SO):
|
|||||||
-$(Q) $(OBJCOPY) -w -L '$(SYMBOL_PREFIX)Init_*' -L '$(SYMBOL_PREFIX)ruby_static_id_*' \
|
-$(Q) $(OBJCOPY) -w -L '$(SYMBOL_PREFIX)Init_*' -L '$(SYMBOL_PREFIX)ruby_static_id_*' \
|
||||||
-L '$(SYMBOL_PREFIX)*_threadptr_*' -L '$(SYMBOL_PREFIX)*_ec_*' $@
|
-L '$(SYMBOL_PREFIX)*_threadptr_*' -L '$(SYMBOL_PREFIX)*_ec_*' $@
|
||||||
$(Q) $(POSTLINK)
|
$(Q) $(POSTLINK)
|
||||||
@-$(MINIRUBY) -e 'ARGV.each{|link| File.delete link rescue nil; \
|
@-$(MINIRUBY) -e 'so, *aliases = ARGV; aliases.uniq!; aliases.delete(File.basename(so)); \
|
||||||
File.symlink "$(LIBRUBY_SO)", link}' \
|
aliases.each { |link| File.delete link rescue nil; File.symlink so, link }' \
|
||||||
$(LIBRUBY_ALIASES) || true
|
$(LIBRUBY_SO) $(LIBRUBY_ALIASES) || true
|
||||||
|
|
||||||
LIBRUBY_WITH_EXT = @LIBRUBY_WITH_EXT@
|
LIBRUBY_WITH_EXT = @LIBRUBY_WITH_EXT@
|
||||||
$(LIBRUBY_$(LIBRUBY_WITH_EXT)): $(LIBRUBY_SO_UPDATE)
|
$(LIBRUBY_$(LIBRUBY_WITH_EXT)): $(LIBRUBY_SO_UPDATE)
|
||||||
|
@ -360,7 +360,7 @@ install?(:local, :arch, :lib, :'lib-arch') do
|
|||||||
install lib, libdir, :mode => $prog_mode, :strip => $strip unless lib == arc
|
install lib, libdir, :mode => $prog_mode, :strip => $strip unless lib == arc
|
||||||
install arc, libdir, :mode => $data_mode unless CONFIG["INSTALL_STATIC_LIBRARY"] == "no"
|
install arc, libdir, :mode => $data_mode unless CONFIG["INSTALL_STATIC_LIBRARY"] == "no"
|
||||||
if dll == lib and dll != arc
|
if dll == lib and dll != arc
|
||||||
for link in CONFIG["LIBRUBY_ALIASES"].split
|
for link in CONFIG["LIBRUBY_ALIASES"].split - [File.basename(dll)]
|
||||||
ln_sf(dll, File.join(libdir, link))
|
ln_sf(dll, File.join(libdir, link))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user