+ $(AM_V_GEN)rm -f $@-t $@ \
+ && sed \
+ -e 's|/bin/sh|$(SHELL)|g' \
+ -e 's|[@]GREP@|$(GREP)|g' \
+ -e 's|[@]VERSION@|$(VERSION)|g' \
+ $(srcdir)/$@.in >$@-t \
+ && chmod a=rx $@-t \
+ && mv $@-t $@
+
+# Arrange so that .tarball-version appears only in the distribution
+# tarball, and never in a checked-out repository.
+dist-hook: gen-ChangeLog
+ $(AM_V_GEN)echo $(VERSION) > $(distdir)/.tarball-version
+
+gen_start_date = 2008-01-01
+.PHONY: gen-ChangeLog
+gen-ChangeLog:
+ $(AM_V_GEN)if test -d .git; then \
+ $(top_srcdir)/build-aux/gitlog-to-changelog \
+ --since=$(gen_start_date) > $(distdir)/cl-t && \
+ { rm -f $(distdir)/ChangeLog && \
+ mv $(distdir)/cl-t $(distdir)/ChangeLog; } \
+ fi
+
+# Prepend "." to $PATH:
+new_path = PATH=.$(PATH_SEPARATOR)$$PATH
+
+# A simple test, just of gzip -- more of a sanity check than anything else.
+FILES_TO_CHECK = $(bin_SCRIPTS) \
+ $(top_srcdir)/ChangeLog $(top_srcdir)/configure $(top_srcdir)/gzip.c
+check-local: $(FILES_TO_CHECK) $(bin_PROGRAMS) gzip.doc.gz
+ $(AM_V_GEN)$(new_path); { test '$(srcdir)' != . \
+ || zdiff gzip.doc.gz; }
+ $(AM_V_at)$(new_path); zdiff $(srcdir)/gzip.doc $(srcdir)/gzip.doc
+ $(AM_V_at)$(new_path); zdiff $(srcdir)/gzip.doc gzip.doc.gz
+ $(AM_V_at)$(new_path); zdiff - $(srcdir)/gzip.doc <gzip.doc.gz
+ $(AM_V_at)$(new_path); zdiff gzip.doc.gz gzip.doc.gz
+ $(AM_V_at)$(new_path); zgrep -iV >/dev/null
+ $(AM_V_at)$(new_path); \
+ for opt in --rsyncable '' -1 -9; do \
+ for file in $(FILES_TO_CHECK); do \
+ gzip $$opt -c -- "$$file" \
+ | gzip -d | cmp - "$$file" || exit 1; \
+ done; \
+ done
+
+install-exec-hook: remove-installed-links
+install-exec-hook remove-installed-links:
+ @for prog_ext in $(bin_PROGRAMS) $(bin_SCRIPTS); do \
+ prog=`echo "$$prog_ext"|sed 's/$(EXEEXT)$$//'`; \
+ case $$prog in \
+ gunzip) aliases='uncompress';; \
+ *) continue;; \
+ esac; \
+ transform='$(transform)'; \
+ test "X$$prog" = "X$$prog_ext" || \
+ transform="$$transform"';s/$$/$(EXEEXT)/'; \
+ destbindir=$(DESTDIR)$(bindir); \
+ source=`echo "$$prog"|sed "$$transform"`; \
+ for alias in $$aliases; do \
+ dest=`echo "$$alias"|sed "$$transform"`; \
+ (set -x; \
+ cd "$$destbindir" && \
+ rm -f "$$dest" && \
+ case $@ in \
+ install-exec-hook) \
+ ln "$$source" "$$dest" || $(LN_S) "$$source" "$$dest";; \
+ esac \
+ ) || exit; \
+ done; \
+ done
+
+uninstall-local: remove-installed-links
+
+ALL_RECURSIVE_TARGETS += distcheck-hook
+distcheck-hook:
+ $(MAKE) my-distcheck