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 does the check when the
19 # SUBDIRS variable is involved.
23 cat >> configure.ac
<<'END'
24 AC_CONFIG_FILES([sub1/Makefile sub2/Makefile])
31 cat > Makefile.am
<<'END'
36 echo '# this is foo.am' > foo.am
40 echo 'include $(srcdir)/bar.am' > sub
1/Makefile.am
41 echo '# this is bar.am' > sub
1/bar.am
43 echo 'include $(top_srcdir)/foo.am' > sub
2/Makefile.am
47 $FGREP 'this is foo.am' Makefile.
in
48 $FGREP 'this is bar.am' sub
1/Makefile.
in
49 $FGREP 'this is foo.am' sub
2/Makefile.
in
52 $MAKE # Should be no-op.
55 echo '# this is sub1/Makefile.am' > sub
1/Makefile.am
59 $FGREP 'this is bar' sub
1/Makefile.
in sub
1/Makefile
&& exit 1
60 $FGREP 'this is sub1/Makefile.am' sub
1/Makefile.
in
61 $FGREP 'this is sub1/Makefile.am' sub
1/Makefile
65 sed "s|.*include.*foo\.am.*|# this is $d/Makefile.am|" $d/Makefile.am
> t
66 mv -f t
$d/Makefile.am
71 $FGREP 'this is foo' sub
*/Makefile
* Makefile
* && exit 1
72 for d
in . sub1 sub2
; do
73 $FGREP "this is $d/Makefile.am" $d/Makefile.
in
74 $FGREP "this is $d/Makefile.am" $d/Makefile