2 # Copyright (C) 2011-2012 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)
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 inclusion of '.am' fragments by automake does not suffer
18 # of the "deleted header problem". This test checks deeper inclusion
19 # stacks, and use VPATH builds.
23 echo AC_OUTPUT
>> configure.ac
28 cat > Makefile.am
<<'END'
29 include $(srcdir)/foo.am
39 echo 'include $(top_srcdir)/sub/zardoz.am' > sub
/bar.am
40 echo '# this is zardoz' > sub
/zardoz.am
42 echo 'include fnord.am' > baz.am
43 echo '# you are not seeing this' > fnord.am
47 $FGREP 'this is zardoz' Makefile.
in
48 $FGREP 'you are not seeing this' Makefile.
in
59 echo '# this is baz' > $srcdir/baz.am
60 rm -f $srcdir/fnord.am
63 $FGREP 'you are not seeing this' $srcdir/Makefile.
in Makefile
&& exit 1
64 $FGREP 'this is baz' $srcdir/Makefile.
in
65 $FGREP 'this is baz' Makefile
68 rm -rf $srcdir/sub
$srcdir/foo.am
$srcdir/baz.am
69 echo '# no more inclusions' > $srcdir/Makefile.am
72 $EGREP 'this is (foo|bar|baz)' Makefile
$srcdir/Makefile.
in && exit 1
73 $FGREP 'no more inclusions' Makefile