Merge branch 'simplify-exit-trap-workaround' into maint
[platform/upstream/automake.git] / t / output13.sh
1 #! /bin/sh
2 # Copyright (C) 2007-2012 Free Software Foundation, Inc.
3 #
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 2, or (at your option)
7 # any later version.
8 #
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.
13 #
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/>.
16
17 # Make sure an AC_CONFIG_FILES, AC_CONFIG_LINKS, and AC_CONFIG_COMMANDS
18 # are not prerequisites of 'all'.
19
20 . ./defs || exit 1
21
22 cat >> configure.ac << \END
23 AC_SUBST([FOO], [foo])
24 if $create; then
25   AC_CONFIG_FILES([file])
26   AC_CONFIG_LINKS([link:input])
27   AC_CONFIG_COMMANDS([stamp], [echo stamp > stamp])
28 fi
29 AC_OUTPUT
30 END
31
32 : >Makefile.am
33
34 echo link > input
35 echo @FOO@ >file.in
36
37 $ACLOCAL
38 $AUTOCONF
39 $AUTOMAKE
40
41 ./configure create=false
42 $MAKE
43 test ! -f file
44 test ! -f link
45 test ! -f stamp
46
47 ./configure create=:
48 test -f file
49 test -f link
50 test -f stamp