310cb176e1e12b63d94b3ec4af10496fb9a975b4
[platform/upstream/automake.git] / tests / make.test
1 #! /bin/sh
2
3 # Test to make sure `make' check works.
4 # From Ralf Corsepius.
5
6 . $srcdir/defs || exit 1
7
8 cat > configure.in << 'END'
9 AC_INIT(Makefile.am)
10 AM_INIT_AUTOMAKE(foo,0,no)
11 AM_MAKE_INCLUDE
12 AC_OUTPUT(Makefile)
13 END
14
15 : > Makefile.am
16
17 $needs_gnu_make
18
19 set -e
20
21 $ACLOCAL
22 $AUTOCONF
23 $AUTOMAKE
24
25 export ACLOCAL
26 export AUTOCONF
27 export AUTOMAKE
28
29 # Do the test twice -- once with make and once with make -w.
30 # This tests for a bug reported by Rainer Orth (see PR 175).
31
32 save="$MAKE"
33 for flag in '' -w; do
34    MAKE="$save $flag" ./configure
35
36    fgrep 'am__include = include' Makefile
37
38    touch configure.in
39    $MAKE $flag
40
41    fgrep 'am__include = include' Makefile
42
43    rm -f config.cache
44 done
45
46 exit 0