tests: port to systems for which ":" is not the PATH separator
authorJim Meyering <meyering@fb.com>
Sun, 6 Mar 2016 20:27:28 +0000 (12:27 -0800)
committerJim Meyering <meyering@fb.com>
Sun, 6 Mar 2016 20:27:28 +0000 (12:27 -0800)
* Makefile.am (new_path): New variable.
(check-local): Use $(PATH_SEPARATOR) rather than a literal ":",
to avoid "make syntax-check" failure.

Makefile.am

index 8fb17b9d15c065cd961c3dc48671d4056f3617fb..dfed9aac09f3e47f76b60cebfd8073ac7f65b54d 100644 (file)
@@ -103,18 +103,21 @@ 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
-       $(AM_V_GEN)PATH=.:$$PATH; { test '$(srcdir)' != . \
-                      || zdiff -c gzip.doc.gz; }
-       $(AM_V_at)PATH=.:$$PATH; zdiff -c $(srcdir)/gzip.doc $(srcdir)/gzip.doc
-       $(AM_V_at)PATH=.:$$PATH; zdiff $(srcdir)/gzip.doc gzip.doc.gz
-       $(AM_V_at)PATH=.:$$PATH; zdiff -c - $(srcdir)/gzip.doc <gzip.doc.gz
-       $(AM_V_at)PATH=.:$$PATH; zdiff -c gzip.doc.gz gzip.doc.gz
-       $(AM_V_at)PATH=.:$$PATH; zgrep -iV >/dev/null
-       $(AM_V_at)PATH=.:$$PATH;                        \
+       $(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"                  \