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 remake rules works from subdirectories, even with non-GNU
18 # make implementations.
19 # See also the other similar tests `remake-subdir*.test', and the
20 # related test `aclocal5.test'.
27 remake
="$MAKE Makefile"
30 magic1
='::MagicString::One::'
31 magic2
='__MagicString__Two__'
35 grep -i magic configure Makefile.
in Makefile sub
/Makefile.
in sub
/Makefile
38 cat >> configure.
in <<'END'
39 AC_CONFIG_FILES([sub/Makefile])
40 AC_SUBST([MAGIC], [magic])
44 cat > Makefile.am
<<'END'
60 sed "s|magic|$magic1|" configure.
in > t
66 $FGREP $magic1 configure
67 $FGREP $magic1 Makefile
68 $FGREP $magic1 sub
/Makefile
72 echo MAGIC
= $magic2 >> Makefile.am
76 $FGREP $magic2 sub
/Makefile
77 $FGREP $magic2 sub
/Makefile.
in
78 $FGREP $magic1 sub
/Makefile sub
/Makefile.
in && Exit
1
79 $FGREP $magic2 Makefile Makefile.
in && Exit
1