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 # The $(SUDBIRS) entries are processed in the order they are specified.
21 cat >> configure.ac << 'END'
33 mkdir sub0 sub1 sub2 sub3 sub3/a sub3/b
35 cat > Makefile.am << 'END'
36 SUBDIRS = sub2 sub1 sub3 sub0
57 cat > sub0/Makefile.am << 'END'
59 test ! -f $(top_builddir)/run
60 test -f $(top_builddir)/sub1/run
61 test -f $(top_builddir)/sub3/run
62 test -f $(top_builddir)/sub3/a/run
63 test -f $(top_builddir)/sub3/b/run
68 cat > sub1/Makefile.am << 'END'
70 test ! -f $(top_builddir)/run
71 test ! -f $(top_builddir)/sub0/run
72 test -f $(top_builddir)/sub2/run
73 test ! -f $(top_builddir)/sub3/run
74 test ! -f $(top_builddir)/sub3/a/run
75 test ! -f $(top_builddir)/sub3/b/run
81 cat > sub2/Makefile.am << 'END'
83 test ! -f $(top_builddir)/run
84 test ! -f $(top_builddir)/sub0/run
85 test ! -f $(top_builddir)/sub1/run
86 test ! -f $(top_builddir)/sub3/run
87 test ! -f $(top_builddir)/sub3/a/run
88 test ! -f $(top_builddir)/sub3/b/run
93 cat > sub3/Makefile.am << 'END'
96 test ! -f $(top_builddir)/run
97 test ! -f $(top_builddir)/sub0/run
98 test -f $(top_builddir)/sub1/run
99 test ! -f $(top_builddir)/sub3/a/run
100 test -f $(top_builddir)/sub3/b/run
105 cat > sub3/a/Makefile.am << 'END'
107 test ! -f $(top_builddir)/run
108 test ! -f $(top_builddir)/sub0/run
109 test -f $(top_builddir)/sub1/run
110 test -f $(top_builddir)/sub3/b/run
111 test -f $(top_builddir)/sub3/run
116 cat > sub3/b/Makefile.am << 'END'
118 test ! -f $(top_builddir)/run
119 test ! -f $(top_builddir)/sub0/run
120 test -f $(top_builddir)/sub1/run
121 test ! -f $(top_builddir)/sub3/b/run
122 test ! -f $(top_builddir)/sub3/run
127 echo dummy: > Makefile
130 elif $MAKE -j12; then
132 elif $MAKE -j 12; then
141 $AUTOMAKE -c --add-missing
145 for j in '' "$jobs"; do
146 test x"$j" = x"none" && continue
155 find . | grep 'run$' && Exit 1
156 : # For shells with busted 'set -e'