tests: cosmetic changes in t/extra-sources.sh
[platform/upstream/automake.git] / t / missing-auxfile-stops-makefiles-creation.sh
1 #! /bin/sh
2 # Copyright (C) 2011-2013 Free Software Foundation, Inc.
3 #
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.
8 #
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.
13 #
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/>.
16
17 # Automake should stop the creation of Makefile.in files at the first
18 # encountered error due to a required auxiliary file not found.
19
20 . test-init.sh
21
22 cat >> configure.ac <<END
23 AM_PATH_PYTHON
24 END
25
26 echo SUBDIRS = > Makefile.am
27
28 for i in 1 2 3 4 5; do
29   echo "AC_CONFIG_FILES([sub$i/Makefile])" >> configure.ac
30   echo "SUBDIRS += sub$i" >> Makefile.am
31   mkdir sub$i
32   echo python_PYTHON = foo.py > sub$i/Makefile.am
33 done
34
35 : > sub1/Makefile.am
36
37 $ACLOCAL
38
39 unset AUTOMAKE_JOBS
40
41 AUTOMAKE_fails
42 ls -l Makefile.in */Makefile.in || : # For debugging.
43 # Top-level Makefile.in might be created or not, we don't want to set
44 # too strict semantics here, so don't check for it.  But the later
45 # files shouldn't exist.
46 test -f sub1/Makefile.in
47 test ! -e sub2/Makefile.in
48 test ! -e sub3/Makefile.in
49 test ! -e sub4/Makefile.in
50 test ! -e sub5/Makefile.in
51
52 rm -f Makefile.in */Makefile.in
53
54 : > sub2/Makefile.am
55 : > sub3/Makefile.am
56
57 AUTOMAKE_fails
58 ls -l Makefile.in */Makefile.in || : # For debugging.
59 test -f sub1/Makefile.in
60 test -f sub2/Makefile.in
61 test -f sub3/Makefile.in
62 test ! -e sub4/Makefile.in
63 test ! -e sub5/Makefile.in
64
65 :