summaryrefslogtreecommitdiff
path: root/Makerules
diff options
context:
space:
mode:
Diffstat (limited to 'Makerules')
-rw-r--r--Makerules18
1 files changed, 13 insertions, 5 deletions
diff --git a/Makerules b/Makerules
index 6a8638f6e9..19ec2410d8 100644
--- a/Makerules
+++ b/Makerules
@@ -600,16 +600,24 @@ versioned := $(strip $(foreach so,$(install-lib.so),\
$(addprefix $(slibdir)/,$(filter-out $(versioned),$(install-lib.so))): \
$(slibdir)/%.so: $(objpfx)%.so; $(do-install-program)
+ifneq ($(findstring -s,$(LN_S)),)
define make-link
-here=`pwd`; cd $(@D); \
-rm -f $(@F).new; \
+rm -f $@.new; \
if test '$(@D)' = '$(<D)'; then \
- $(LN_S) $(<F) $(@F).new; \
+ (cd $(@D); $(LN_S) $(<F) $(@F).new); \
else \
- $(SHELL) $$here/$(..)rellns-sh $< $(@F).new; \
+ $(SHELL) $(..)rellns-sh $< $@.new; \
fi; \
-mv -f $(@F).new $(@F)
+mv -f $@.new $@
+endef
+else
+# If we have no symbolic links don't bother with rellns-sh.
+define make-link
+rm -f $@.new; \
+$(LN_S) $< $@.new; \
+mv -f $@.new $@
endef
+endif
ifdef libc.so-version
# For a library specified to be version N, install three files: