2 # Copyright (C) 2003 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 many conditions do not lead to combinatorial explosion.
18 # (This is related to PR/352.)
20 # On this test, Automake 1.7.x would compute all 2**22 = 4194304
21 # possible combinations of conditionals (it would do this five times,
22 # to define a01_DEPENDENCIES, a02_DEPENDENCIES, a03_OBJECTS,
23 # a04_OBJECTS, and to rewrite bin_PROGRAM), eating all memory, swap,
24 # or cpu time it can found. Although this test won't print `FAIL' if
25 # it fails, it will take long enough so it can't go unnoticed.
31 echo AC_PROG_CC
>>configure.
in
33 cat >Makefile.am
<<EOF
39 for i
in 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22; do
40 cat >>Makefile.am
<<EOF
44 a02_LDADD += bar${i}.o
45 a03_SOURCES += baz${i}.c
46 a04_SOURCES = quux${i}.c
49 echo "AM_CONDITIONAL([C$i], [:])" >>configure.
in