#! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-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
# required '.am' file from a distribution tarball.
# See discussion about automake bug#9768.
-. ./defs || Exit 1
+. test-init.sh
echo AC_OUTPUT >> configure.ac
# A faulty distribution tarball, with a required '.am' file missing.
# Building from it should fail, both for in-tree and VPATH builds.
-ocwd=`pwd` || fatal_ "cannot get current working directory"
+ocwd=$(pwd) || fatal_ "cannot get current working directory"
for vpath in false :; do
$MAKE distdir
test -f $distdir/zardoz.am # Sanity check.
cd $distdir
./configure
fi
- $MAKE >output 2>&1 && { cat output; Exit 1; }
- cat output
+ run_make -e FAIL -M
# This error comes from automake, not make, so we can be stricter
# in our grepping of it.
grep 'cannot open.*zardoz\.am' output
- grep 'foobar\.am' output && Exit 1 # No spurious error, please.
+ grep 'foobar\.am' output && exit 1 # No spurious error, please.
cd "$ocwd" || fatal_ "cannot chdir back to top-level test directory"
done