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". Basic checks are done here.
22 echo AC_OUTPUT
>> configure.ac
27 cat > Makefile.am
<<'END'
29 include $(srcdir)/bar.am
30 include $(top_srcdir)/baz.am
33 echo '# this is foo' > foo.am
34 echo '# this is bar' > bar.am
35 echo '# this is baz' > baz.am
39 $FGREP 'this is foo' Makefile.
in
40 $FGREP 'this is bar' Makefile.
in
41 $FGREP 'this is baz' Makefile.
in
44 $MAKE # Should be no-op.
47 sed '/^include foo\.am$/d' Makefile.am
> t
52 $FGREP 'this is foo' Makefile.
in Makefile
&& exit 1
53 $FGREP 'this is bar' Makefile.
in
54 $FGREP 'this is bar' Makefile
55 $FGREP 'this is baz' Makefile.
in
56 $FGREP 'this is baz' Makefile
59 echo '# empty empty' > Makefile.am
63 $FGREP 'empty empty' Makefile.
in
64 $FGREP 'empty empty' Makefile
65 grep 'this is ba[rz]' Makefile Makefile.
in && exit 1