2 # Copyright (C) 2011 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.
24 echo AC_OUTPUT >> configure.in
29 cat > Makefile.am <<'END'
31 include $(srcdir)/bar.am
32 include $(top_srcdir)/baz.am
35 echo '# this is foo' > foo.am
36 echo '# this is bar' > bar.am
37 echo '# this is baz' > baz.am
41 $FGREP 'this is foo' Makefile.in
42 $FGREP 'this is bar' Makefile.in
43 $FGREP 'this is baz' Makefile.in
46 $MAKE # Should be no-op.
49 sed '/^include foo\.am$/d' Makefile.am > t
54 $FGREP 'this is foo' Makefile.in Makefile && Exit 1
55 $FGREP 'this is bar' Makefile.in
56 $FGREP 'this is bar' Makefile
57 $FGREP 'this is baz' Makefile.in
58 $FGREP 'this is baz' Makefile
61 echo '# empty empty' > Makefile.am
65 $FGREP 'empty empty' Makefile.in
66 $FGREP 'empty empty' Makefile
67 grep 'this is ba[rz]' Makefile Makefile.in && Exit 1