aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile.in
diff options
context:
space:
mode:
authorknu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-06-01 07:13:38 +0000
committerknu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-06-01 07:13:38 +0000
commit7f56e0dbb22b4bb020a2b176a9d4587cd7315c06 (patch)
treecd009f4f12fa2fe8cb6f6761e9d78c49677f68be /Makefile.in
parent24f65f54a8b6ec06250143520cb9a6545e41dffa (diff)
downloadruby-7f56e0dbb22b4bb020a2b176a9d4587cd7315c06.tar.gz
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
Diffstat (limited to 'Makefile.in')
-rw-r--r--Makefile.in6
1 files changed, 3 insertions, 3 deletions
diff --git a/Makefile.in b/Makefile.in
index ccfb2ded2b..259f1fba2e 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -272,9 +272,9 @@ $(LIBRUBY_SO):
-$(Q) $(OBJCOPY) -w -L '$(SYMBOL_PREFIX)Init_*' -L '$(SYMBOL_PREFIX)ruby_static_id_*' \
-L '$(SYMBOL_PREFIX)*_threadptr_*' -L '$(SYMBOL_PREFIX)*_ec_*' $@
$(Q) $(POSTLINK)
- @-$(MINIRUBY) -e 'ARGV.each{|link| File.delete link rescue nil; \
- File.symlink "$(LIBRUBY_SO)", link}' \
- $(LIBRUBY_ALIASES) || true
+ @-$(MINIRUBY) -e 'so, *aliases = ARGV; aliases.uniq!; aliases.delete(File.basename(so)); \
+ aliases.each { |link| File.delete link rescue nil; File.symlink so, link }' \
+ $(LIBRUBY_SO) $(LIBRUBY_ALIASES) || true
LIBRUBY_WITH_EXT = @LIBRUBY_WITH_EXT@
$(LIBRUBY_$(LIBRUBY_WITH_EXT)): $(LIBRUBY_SO_UPDATE)