doc: update Vala documentation
[automake.git] / t / parallel-am3.sh
blob1b40111ea0de988f6ba7a08a3a123fb2e83b81c9
1 #! /bin/sh
2 # Copyright (C) 2008-2024 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 <https://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 required=perl-threads
25 . test-init.sh
27 cat > configure.ac << 'END'
28 AC_INIT([parallel-am], [1.0])
29 AC_CONFIG_AUX_DIR([build-aux])
30 AM_INIT_AUTOMAKE
31 AC_PROG_CC
32 AM_PATH_LISPDIR
33 AM_PATH_PYTHON
34 AC_CONFIG_FILES([Makefile])
35 END
37 cat > Makefile.am << 'END'
38 SUBDIRS =
39 END
41 list='1 2 3'
42 for i in $list; do
43 echo "AC_CONFIG_FILES([sub$i/Makefile])" >> configure.ac
44 echo "SUBDIRS += sub$i" >> Makefile.am
45 mkdir sub$i
46 unindent > sub$i/Makefile.am <<END
47 python_PYTHON = foo$i.py
48 lisp_LISP = foo$i.el
49 bin_PROGRAMS = p$i
50 END
51 done
53 rm -f install-sh missing depcomp
54 mkdir build-aux
56 $ACLOCAL
58 # Generate expected output using the non-threaded code.
59 unset AUTOMAKE_JOBS
60 AUTOMAKE_run --add-missing
61 mv stderr expected
62 mv Makefile.in Makefile.in.exp
64 AUTOMAKE_JOBS=3
65 export AUTOMAKE_JOBS
67 for run in 1 2 3 4 5 6 7; do
68 rm -f build-aux/* sub*/Makefile.in
69 AUTOMAKE_run --add-missing
70 diff stderr expected
71 diff Makefile.in Makefile.in.exp
72 done