2 # Copyright (C) 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 # Basic checks on user-defined recursive rules.
18 # Check that user recursion respect $(SUBDIRS) order,
19 # and proceeds in a depth-first fashion.
23 cat >> configure.ac <<'END'
24 AM_EXTRA_RECURSIVE_TARGETS([foo])
34 mkdir sub1 sub2 sub3 sub3/deeper
36 cat > Makefile.am <<'END'
37 SUBDIRS = sub1 . sub3 sub2
39 echo '.' >> $(top_builddir)/got
44 diff $(srcdir)/exp ./got
46 MOSTLYCLEANFILES = got
51 cat > sub$i/Makefile.am <<END
53 echo 'sub$i' >> \$(top_builddir)/got
57 echo SUBDIRS = deeper >> sub3/Makefile.am
59 cat >> sub3/deeper/Makefile.am <<'END'
61 echo sub3/deeper >> $(top_builddir)/got