tests: port to systems for which ":" is not the PATH separator
[debian/gzip] / Makefile.am
index 4edbd0d43a7323306499e53bc38f00a5a94abc4e..dfed9aac09f3e47f76b60cebfd8073ac7f65b54d 100644 (file)
@@ -1,6 +1,6 @@
 # Make gzip (GNU zip).
 
-# Copyright (C) 1999, 2001-2002, 2006-2007, 2009-2010 Free Software Foundation,
+# Copyright (C) 1999, 2001-2002, 2006-2007, 2009-2016 Free Software Foundation,
 # Inc.
 
 # This program is free software; you can redistribute it and/or modify
@@ -21,7 +21,6 @@ ALL_RECURSIVE_TARGETS =
 BUILT_SOURCES =
 
 SUBDIRS = lib doc . tests
-ACLOCAL_AMFLAGS = -I m4
 AM_CPPFLAGS = -I$(top_srcdir)/lib
 AM_CFLAGS = $(WARN_CFLAGS) $(WERROR_CFLAGS)
 
@@ -39,23 +38,20 @@ EXTRA_DIST = $(ACINCLUDE_INPUTS) $(man_MANS) \
   ChangeLog-2007 \
   cfg.mk       \
   dist-check.mk        \
-  algorithm.doc amiga/match.a amiga/Makefile.gcc amiga/Makefile.sasc \
-  amiga/tailor.c amiga/utime.h atari/Makefile.st crypt.h \
-  gunzip.in gzexe.in gzip.doc gzip.h lzw.h msdos/match.asm msdos/tailor.c \
-  msdos/gzip.prj msdos/doturboc.bat msdos/Makefile.msc msdos/Makefile.bor \
-  msdos/Makefile.djg nt/Makefile.nt os2/gzip.def os2/Makefile.os2 \
-  os2/gzip16.def \
+  algorithm.doc \
+  gunzip.in gzexe.in gzip.doc \
   revision.h sample/makecrc.c \
   sample/ztouch sample/add.c sample/sub.c sample/zread.c sample/zfile \
-  tailor.h vms/Makefile.mms vms/gzip.hlp vms/vms.c vms/Readme.vms \
-  vms/Makefile.vms vms/Makefile.gcc vms/makegzip.com zcat.in zcmp.in zdiff.in \
+  tailor.h \
+  zcat.in zcmp.in zdiff.in \
   zegrep.in zfgrep.in zforce.in zgrep.in zless.in zmore.in znew.in
+noinst_HEADERS = gzip.h lzw.h
 
 bin_PROGRAMS = gzip
 bin_SCRIPTS = gunzip gzexe zcat zcmp zdiff \
   zegrep zfgrep zforce zgrep zless zmore znew
 gzip_SOURCES = \
-  bits.c crypt.c deflate.c gzip.c inflate.c lzw.c \
+  bits.c deflate.c gzip.c inflate.c lzw.c \
   trees.c unlzh.c unlzw.c unpack.c unzip.c util.c zip.c
 gzip_LDADD = libver.a lib/libgzip.a
 gzip_LDADD += $(LIB_CLOCK_GETTIME)
@@ -86,7 +82,7 @@ SUFFIXES = .in
 .in:
        $(AM_V_GEN)sed \
                -e 's|/bin/sh|$(SHELL)|g' \
-               -e 's|[@]bindir@|'\''$(bindir)'\''|g' \
+               -e 's|[@]GREP@|$(GREP)|g' \
                -e 's|[@]VERSION@|$(VERSION)|g' \
                $(srcdir)/$@.in >$@-t \
          && chmod a+x $@-t \
@@ -107,20 +103,27 @@ gen-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
-       { test '$(srcdir)' != . || ./zdiff --__bindir . -c gzip.doc.gz; }
-       ./zdiff --__bindir . -c $(srcdir)/gzip.doc $(srcdir)/gzip.doc
-       ./zdiff --__bindir . $(srcdir)/gzip.doc gzip.doc.gz
-       ./zdiff --__bindir . -c - $(srcdir)/gzip.doc <gzip.doc.gz
-       ./zdiff --__bindir . -c gzip.doc.gz gzip.doc.gz
-       ./zgrep --__bindir . -iV >/dev/null
-       for file in $(FILES_TO_CHECK); do \
-         ./gzip -cv -- "$$file" | ./gzip -d | cmp - "$$file" || exit 1; \
+       $(AM_V_GEN)$(new_path); { test '$(srcdir)' != . \
+                                   || zdiff -c gzip.doc.gz; }
+       $(AM_V_at)$(new_path); zdiff -c $(srcdir)/gzip.doc $(srcdir)/gzip.doc
+       $(AM_V_at)$(new_path); zdiff $(srcdir)/gzip.doc gzip.doc.gz
+       $(AM_V_at)$(new_path); zdiff -c - $(srcdir)/gzip.doc <gzip.doc.gz
+       $(AM_V_at)$(new_path); zdiff -c 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
-       @echo 'Test succeeded.'
 
 install-exec-hook: remove-installed-links
 install-exec-hook remove-installed-links: