2 # Copyright (C) 2011-2013 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 # Test remake rules when m4 files get moved among different "include
18 # dirs" (i.e. those passed to aclocal with '-I' option).
22 cat >> configure.ac <<'END'
27 cat > Makefile.am <<'END'
28 ACLOCAL_AMFLAGS = -I d1 -I d2 -I d3
31 test '$(the_answer)' -eq 42
36 cat > d1/macros.m4 <<'END'
37 AC_DEFUN([MY_MACRO], [FOO])
40 cat > d1/foo.m4 <<'END'
41 AC_DEFUN([FOO], [the_answer=42; AC_SUBST([the_answer])])
52 mv d1/foo.m4 d2/foo.m4
53 using_gmake || $MAKE Makefile
56 ls -l $distdir $distdir/*
57 test -f $distdir/d2/foo.m4
58 test ! -e $distdir/d1/foo.m4
59 test -f $distdir/d1/macros.m4
60 test ! -e $distdir/d2/macros.m4
62 # Move both files at once.
63 mv d1/macros.m4 d3/macros.m4
64 mv d2/foo.m4 d3/foo.m4
65 using_gmake || $MAKE Makefile
68 ls -l $distdir $distdir/*
69 test -f $distdir/d3/foo.m4
70 test -f $distdir/d3/macros.m4
71 test ! -e $distdir/d1/foo.m4
72 test ! -e $distdir/d2/foo.m4
73 test ! -e $distdir/d1/macros.m4
74 test ! -e $distdir/d2/macros.m4