Clarify overriding of `*_DEPENDENCIES' in LIBOBJS node.
[automake/ericb.git] / tests / depend5.test
blob5644933b79c30de8f39947bba3ea6057e6fa484d
1 #! /bin/sh
2 # Copyright (C) 2008 Free Software Foundation, Inc.
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation; either version 3, or (at your option)
7 # any later version.
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
14 # You should have received a copy of the GNU General Public License
15 # along with this program. If not, see <http://www.gnu.org/licenses/>.
17 # Check that _AM_OUTPUT_DEPENDENCY_COMMANDS works with eval-style
18 # quoting in $CONFIG_FILES, done by newer Autoconf.
20 . ./defs || Exit 1
22 set -e
24 cat >>configure.in << END
25 AC_PROG_CC
26 AC_OUTPUT
27 END
29 cat > Makefile.am << END
30 bin_PROGRAMS = foo
31 foo_SOURCES = foo.c foo.h
32 END
34 cat >foo.c << END
35 #include "foo.h"
36 END
37 : >foo.h
39 $ACLOCAL
40 $AUTOMAKE
41 $AUTOCONF
42 ./configure --enable-dependency-tracking
43 if test -d .deps; then
44 depdir=.deps
45 elif test -d _deps; then
46 depdir=_deps
47 else
48 depdir=
51 # For the fun of it, we should also cope with makefile
52 # names that contain weird characters, with Autoconf 2.62
53 # and newer.
54 name='weird name with $ `#() &! characters"'
55 cp Makefile.in "$name.in"
57 for arg in Makefile \
58 --file=Makefile \
59 "--file=$name"
61 rm -rf .deps _deps
62 ./config.status "$arg" depfiles >stdout 2>stderr
63 cat stdout
64 cat stderr >&2
65 grep '[Nn]o such file' stderr && Exit 1
67 if test -n "$depdir"; then
68 test -d $depdir || Exit 1
70 done