Clarify overriding of `*_DEPENDENCIES' in LIBOBJS node.
[automake/ericb.git] / tests / parallel-am2.test
blob9e002baf4e67ab7f48035316bc762258c8d70f38
1 #! /bin/sh
2 # Copyright (C) 2008 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 3, or (at your option)
7 # any later version.
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 parallel automake execution.
19 # This tests:
20 # 4) warning and normal error output should be identical, in that duplicate
21 # warnings should be omitted in the same way as without threads,
23 . ./defs || Exit 1
25 set -e
27 mkdir sub
29 cat > Makefile.am << 'END'
30 AUTOMAKE_OPTIONS = subdir-objects
31 bin_PROGRAMS = main
32 main_SOURCES = sub/main.c
33 SUBDIRS =
34 END
36 list='1 2 3'
37 for i in $list; do
38 echo "AC_CONFIG_FILES([sub$i/Makefile])" >> configure.in
39 echo "SUBDIRS += sub$i" >> Makefile.am
40 mkdir sub$i sub$i/sub
41 cat > sub$i/Makefile.am << END
42 AUTOMAKE_OPTIONS = subdir-objects
43 bin_PROGRAMS = sub$i
44 sub${i}_SOURCES = sub/main$i.c
45 END
46 done
48 mkdir build-aux
50 $ACLOCAL
52 # Independently of the number of worker threads, automake output
53 # should be
54 # - stable (multiple runs should produce the same output),
55 # - properly uniquified,
56 # - complete (output from worker threads should not be lost).
58 # The parts output by --add-missing are unstable not only wrt. order
59 # but also wrt. content: any of the Makefile.am files may cause the
60 # depcomp script to be installed (or several of them).
61 # Thus we install the auxiliary files in a prior step.
63 # Generate expected output using non-threaded code.
64 unset AUTOMAKE_JOBS || :
65 rm -f install-sh missing depcomp
66 AUTOMAKE_fails --add-missing
67 mv stderr expected
69 AUTOMAKE_JOBS=5
70 export AUTOMAKE_JOBS
72 for i in 1 2 3 4 5 6 7 8; do
73 rm -f install-sh missing depcomp
74 AUTOMAKE_fails --add-missing
75 diff expected stderr
76 done