Merge branch 'minor'
[automake.git] / t / output8.sh
blobf8c9b4f9a9b5081c27889345590f16feb0db8144
1 #! /bin/sh
2 # Copyright (C) 2003-2017 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 2, 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 <https://www.gnu.org/licenses/>.
17 # Check AC_CONFIG_FILES support for files starting with '../'.
18 # Report from Bruno Haible.
20 . test-init.sh
22 mkdir testdir
23 cd testdir
25 mv ../configure.ac .
26 cat >> configure.ac << END
27 AC_CONFIG_FILES([a/foo.sh:../testdir/a/foo.sh.in])
28 AC_CONFIG_FILES([a/Makefile])
29 AC_OUTPUT
30 END
32 mkdir a
34 echo SUBDIRS = a >Makefile.am
35 : >a/Makefile.am
37 echo foo >a/foo.sh.in
39 $ACLOCAL
40 $AUTOCONF
41 $AUTOMAKE --add-missing
43 ./configure
44 $MAKE
45 test "$(cat a/foo.sh)" = foo
47 $sleep
48 echo 'bar' >a/foo.sh.in
50 cd a
51 $MAKE foo.sh
52 test "$(cat foo.sh)" = bar