Fix outdated reference to sh-utils in the manual.
[automake.git] / tests / parallel-am3.test
blob5db9c67259856ad4278f8ed11729dbb9553a9f68
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 2, 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 # 3) normal automake output should be identical and ordered in the same way
21 # with --add-missing, even with concurrent file requirements, and the
22 # installation of aux files should be race-free,
24 . ./defs || Exit 1
26 set -e
28 cat > configure.in << 'END'
29 AC_INIT([parallel-am], [1.0])
30 AC_CONFIG_AUX_DIR([build-aux])
31 AM_INIT_AUTOMAKE
32 AC_PROG_CC
33 AM_PATH_LISPDIR
34 AM_PATH_PYTHON
35 AC_CONFIG_FILES([Makefile])
36 END
38 cat > Makefile.am << 'END'
39 SUBDIRS =
40 END
42 list='1 2 3'
43 for i in $list; do
44 echo "AC_CONFIG_FILES([sub$i/Makefile])" >> configure.in
45 echo "SUBDIRS += sub$i" >> Makefile.am
46 mkdir sub$i
47 cat > sub$i/Makefile.am <<END
48 python_PYTHON = foo$i.py
49 lisp_LISP = foo$i.el
50 bin_PROGRAMS = p$i
51 END
52 done
54 rm -f install-sh missing depcomp
55 mkdir build-aux
57 $ACLOCAL
59 # Generate expected output using the non-threaded code.
60 unset AUTOMAKE_JOBS || :
61 AUTOMAKE_run 0 --add-missing
62 mv stderr expected
63 mv Makefile.in Makefile.in.exp
65 AUTOMAKE_JOBS=3
66 export AUTOMAKE_JOBS
68 for run in 1 2 3 4 5 6 7; do
69 rm -f build-aux/* sub*/Makefile.in
70 AUTOMAKE_run 0 --add-missing
71 diff stderr expected
72 diff Makefile.in Makefile.in.exp
73 done