1
0
Fork 0
mirror of https://github.com/tobast/libunwind-eh_elf.git synced 2024-11-21 23:27:39 +01:00

Fix symlink install hook

During the install, symlinks are added from libunwind-<arch> to
libunwind-generic.  However, on platforms that don't support
symlinking (such as Windows), the $(LN_S) macro is defined
as 'cp -p' instead.  This works fine, except that since the
target of the symlink is a relative path, the copy will only
succeed if the current directory is the directory that contains
the file.

The solution to this problem suggested in the Autotools manual
(see http://www.gnu.org/software/automake/manual/automake.html#Extending)
is to simply cd into the correct directory first.  This patch
makes that change for the symlinks that are being made during install.

[ edit: use relative path for the link name as well ]
This commit is contained in:
Matt Fischer 2013-04-19 15:18:27 -05:00 committed by Arun Sharma
parent 61fad17d29
commit 612e1056f6

View file

@ -394,10 +394,10 @@ else
# to be there if the user configured with --disable-shared.
#
install-exec-hook:
$(LN_S) -f libunwind-$(arch).a $(DESTDIR)$(libdir)/libunwind-generic.a
cd $(DESTDIR)$(libdir) && $(LN_S) -f libunwind-$(arch).a libunwind-generic.a
if test -f $(DESTDIR)$(libdir)/libunwind-$(arch).so; then \
$(LN_S) -f libunwind-$(arch).so \
$(DESTDIR)$(libdir)/libunwind-generic.so; \
cd $(DESTDIR)$(libdir) && $(LN_S) -f libunwind-$(arch).so \
libunwind-generic.so; \
fi
endif