tests: avoid use of redirected 'run_make' invocations
[platform/upstream/automake.git] / t / distdir.sh
old mode 100755 (executable)
new mode 100644 (file)
index 0657928..4d1410d
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1996-2012 Free Software Foundation, Inc.
+# Copyright (C) 1996-2013 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -21,7 +21,7 @@
 # Also test DISTFILES containing a directory and a file in it,
 # and repeated directories.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_OUTPUT
@@ -64,19 +64,18 @@ cd build
 ../configure
 $MAKE distdir
 # Check to make sure 'foo' isn't made in build directory.
-test -d foo && Exit 1
+test -d foo && exit 1
 
 rm -rf $me-1.0
 # Remove the dot from VERSION for the next grep.
-VERSION=10 MKDIR_P='echo MKDIR_P' $MAKE -e distdir >stdout || :
-cat stdout
+run_make -O -e IGNORE VERSION=10 MKDIR_P='echo MKDIR_P' distdir
 
 # Make sure no './' appear in the directory names.  srcdir is '..', so
 # this also checks that no directory is created in the source tree.
-grep 'MKDIR_P.*\.' stdout && Exit 1
+grep 'MKDIR_P.*\.' stdout && exit 1
 
 cd ..
-./configure --prefix "`pwd`"
+./configure --prefix "$(pwd)"
 $MAKE distcheck
 
 :