summaryrefslogtreecommitdiff
path: root/src/Makefile.am
diff options
context:
space:
mode:
authorMatt Fischer <matt.fischer@garmin.com>2013-04-19 15:18:27 -0500
committerArun Sharma <asharma@fb.com>2013-04-19 20:07:02 -0700
commit612e1056f69fb95409586ff715f614c0bbc013d8 (patch)
tree9c476e8d05b0cba2ba0908a1c58b8a1995cf9854 /src/Makefile.am
parent61fad17d29ed661d15a80ed931c7822e5e7ea411 (diff)
downloadlibunwind-612e1056f69fb95409586ff715f614c0bbc013d8.tar.gz
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 ]
Diffstat (limited to 'src/Makefile.am')
-rw-r--r--src/Makefile.am6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index 30cb3967..3daa2464 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -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