From: Paul Eggert Date: Fri, 8 Dec 2006 00:08:54 +0000 (+0000) Subject: * Makefile.am (install-exec-hook): Fix bug when installing X-Git-Tag: v1.3.12~42 X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=c3dfbd06c40d45368fa160b6cfb384163b29336a;p=debian%2Fgzip * Makefile.am (install-exec-hook): Fix bug when installing symbolic links as aliases. Problem reported by Mike Frysinger. --- diff --git a/ChangeLog b/ChangeLog index ca09d76..3b8017e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2006-12-07 Paul Eggert + * Makefile.am (install-exec-hook): Fix bug when installing + symbolic links as aliases. Problem reported by Mike Frysinger. + * deflate.c (deflate_fast, deflate): Avoid core dump. Problem originally reported by Jochen Friedrich and trivial patch supplied by Anthony Towns; see . diff --git a/Makefile.am b/Makefile.am index 9ec8c77..4114152 100644 --- a/Makefile.am +++ b/Makefile.am @@ -79,16 +79,16 @@ install-exec-hook remove-installed-links: transform='$(transform)'; \ test "X$$prog" = "X$$prog_ext" || \ transform="$$transform"';s/$$/$(EXEEXT)/'; \ - source=$(DESTDIR)$(bindir)/`echo "$$prog"|sed "$$transform"`; \ + destbindir=$(DESTDIR)$(bindir); \ + source=`echo "$$prog"|sed "$$transform"`; \ for alias in $$aliases; do \ - dest=$(DESTDIR)$(bindir)/`echo "$$alias"|sed "$$transform"`; \ + dest=`echo "$$alias"|sed "$$transform"`; \ (set -x; \ + cd "$$destbindir" && \ rm -f "$$dest" && \ case $@ in \ install-exec-hook) \ - for ln in ln "$(LN_S)"; do \ - $$ln "$$source" "$$dest" && break; \ - done;; \ + ln "$$source" "$$dest" || $(LN_S) "$$source" "$$dest";; \ esac \ ) || exit; \ done; \