am-ft: make the environment available earlier
[platform/upstream/automake.git] / t / backcompat-acout.sh
1 #! /bin/sh
2 # Copyright (C) 2010-2013 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 # Backward-compatibility: AC_OUTPUT with arguments.
18
19 . test-init.sh
20
21 mkdir sub
22 : > Makefile.am
23 : > zardoz
24 : > foo.in
25 : > foo1.in
26 : > foo2.in
27 : > foo3.in
28 : > sub/bar.in
29
30 ls -l # For debugging.
31
32 for args in \
33   'foo' \
34   'foo:foo1.in' \
35   'foo:zardoz' \
36   'foo:sub/bar.in' \
37   'foo:foo1.in:foo2.in' \
38   'foo:zardoz:zardoz' \
39   'foo:foo1.in:foo2.in:foo3.in' \
40   'foo:foo1.in:foo2.in:sub/bar.in:foo3.in' \
41 ; do
42   rm -rf autom4te*.cache aclocal.m4
43   unindent >configure.ac <<END
44     AC_INIT([$me], [1.0])
45     AM_INIT_AUTOMAKE
46     AC_CONFIG_FILES([$args])
47     AC_OUTPUT
48 END
49   cat configure.ac # For debugging.
50   $ACLOCAL
51   $AUTOMAKE Makefile
52   mv -f Makefile.in Makefile.acf
53   rm -rf autom4te*.cache aclocal.m4
54   unindent >configure.ac <<END
55     AC_INIT([$me], [1.0])
56     AM_INIT_AUTOMAKE
57     AC_OUTPUT([$args])
58 END
59   cat configure.ac # For debugging.
60   $ACLOCAL
61   $AUTOMAKE Makefile
62   mv -f Makefile.in Makefile.aco
63   diff Makefile.acf Makefile.aco
64 done
65
66 :