2 # Copyright (C) 2011-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 # Check that auxiliary script 'test-driver' gets automatically installed
18 # in the correct directory by 'parallel-tests' option.
23 : Try first with parallel-tests defined in AM_INIT_AUTOMAKE.
25 mkdir am-init-automake
28 cat > configure.ac <<END
30 AC_CONFIG_AUX_DIR([my_aux_dir])
31 AM_INIT_AUTOMAKE([parallel-tests])
32 AC_CONFIG_FILES([Makefile sub/Makefile])
38 cat > Makefile.am <<END
43 cat > sub/Makefile.am <<END
48 $AUTOMAKE -a 2>stderr || { cat stderr >&2; Exit 1; }
51 ls -l . sub my_aux_dir # For debugging.
52 test -f my_aux_dir/test-driver
54 test ! -r sub/test-driver
56 grep '^configure\.ac:3:.*installing.*my_aux_dir/test-driver' stderr
60 : Now try with parallel-tests defined in AUTOMAKE_OPTIONS.
62 mkdir automake-options
65 cat > configure.ac <<END
67 AC_CONFIG_AUX_DIR([build-aux])
69 AC_CONFIG_FILES([dir/GNUmakefile])
75 cat > dir/GNUmakefile.am <<END
77 AUTOMAKE_OPTIONS = parallel-tests
82 $AUTOMAKE --add-missing --copy dir/GNUmakefile 2>stderr \
83 || { cat stderr >&2; Exit 1; }
86 ls -l . dir build-aux # For debugging.
87 test -f build-aux/test-driver
89 test ! -r dir/test-driver
91 grep '^dir/GNUmakefile\.am:2:.*installing.*build-aux/test-driver' stderr