From 792db79f27ad9ab1fb977e23be65c7761f545752 Mon Sep 17 00:00:00 2001 From: Lasse Collin Date: Sat, 27 Jun 2009 12:32:40 +0300 Subject: Create correct symlinks even when --program-{prefix,suffix,transform} is passed to configure. --- src/xz/Makefile.am | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) (limited to 'src/xz') 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 -- cgit v1.2.3