aboutsummaryrefslogtreecommitdiff
path: root/src/xz
diff options
context:
space:
mode:
authorLasse Collin <lasse.collin@tukaani.org>2009-06-27 12:32:40 +0300
committerLasse Collin <lasse.collin@tukaani.org>2009-06-27 12:32:40 +0300
commit792db79f27ad9ab1fb977e23be65c7761f545752 (patch)
tree85c6b375b9b33a3cb69541fe0b1d133c8696e3a7 /src/xz
parentSilence a compiler warning on DOS-like systems. (diff)
downloadxz-792db79f27ad9ab1fb977e23be65c7761f545752.tar.xz
Create correct symlinks even when
--program-{prefix,suffix,transform} is passed to configure.
Diffstat (limited to 'src/xz')
-rw-r--r--src/xz/Makefile.am21
1 files changed, 13 insertions, 8 deletions
diff --git a/src/xz/Makefile.am b/src/xz/Makefile.am
index 121a2d1c..c0bd05fd 100644
--- a/src/xz/Makefile.am
+++ b/src/xz/Makefile.am
@@ -49,17 +49,22 @@ endif
xz_LDADD += $(LTLIBINTL)
-## Create symlinks for unxz and xzcat for convenicen. Create symlinks also
+## Create symlinks for unxz and xzcat for convenience. Create symlinks also
## for lzma, unlzma, and lzcat for compatibility with LZMA Utils 4.32.x.
+xzlinks = unxz xzcat lzma unlzma lzcat
+
install-exec-hook:
cd $(DESTDIR)$(bindir) && \
- rm -f unxz xzcat lzma unlzma lzcat && \
- $(LN_S) xz unxz && \
- $(LN_S) xz xzcat && \
- $(LN_S) xz lzma && \
- $(LN_S) xz unlzma && \
- $(LN_S) xz lzcat
+ target=`echo xz | $(SED) '$(transform)'` && \
+ for name in $(xzlinks); do \
+ link=`echo $$name | $(SED) '$(transform)'` && \
+ rm -f $$link && \
+ $(LN_S) $$target $$link; \
+ done
uninstall-hook:
cd $(DESTDIR)$(bindir) && \
- rm -f unxz xzcat lzma unlzma lzcat
+ for name in $(xzlinks); do \
+ link=`echo $$name | $(SED) '$(transform)'` && \
+ rm -f $$link; \
+ done