* lib/am/configure.am (am__CONFIG_DISTCLEAN_FILES): Add
[automake.git] / tests / python2.test
blobb17e26f76f0a2da1e3b21224723177b9a2ba1b8a
1 #! /bin/sh
2 # Copyright (C) 2002, 2003 Free Software Foundation, Inc.
4 # This file is part of GNU Automake.
6 # GNU Automake is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 2, or (at your option)
9 # any later version.
11 # GNU Automake is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
16 # You should have received a copy of the GNU General Public License
17 # along with Automake; see the file COPYING. If not, write to
18 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19 # Boston, MA 02111-1307, USA.
21 # Make sure that Automake suggests using AM_PATH_PYTHON.
23 . ./defs || exit 1
25 set -e
27 echo 1
28 # pythondir not defined
30 cat > Makefile.am <<'END'
31 PYTHON = x
32 python_PYTHON = foo.py
33 END
35 $ACLOCAL
36 AUTOMAKE_fails -a
37 grep AM_PATH_PYTHON stderr
39 echo 2
40 # pkgpythondir not defined
42 cat > Makefile.am <<'END'
43 PYTHON = x
44 pkgpython_PYTHON = foo.py
45 END
47 $ACLOCAL
48 AUTOMAKE_fails -a
49 grep AM_PATH_PYTHON stderr
52 echo 3
53 # pyexecdir not defined
55 cat > Makefile.am <<'END'
56 PYTHON = x
57 pyexec_PYTHON = foo.py
58 END
60 $ACLOCAL
61 AUTOMAKE_fails -a
62 grep AM_PATH_PYTHON stderr
65 echo 4
66 # pkgpyexecdir not defined
68 cat > Makefile.am <<'END'
69 PYTHON = x
70 pkgpyexec_PYTHON = foo.py
71 END
73 $ACLOCAL
74 AUTOMAKE_fails -a
75 grep AM_PATH_PYTHON stderr
78 echo 5
79 # PYTHON not defined.
81 cat > Makefile.am <<'END'
82 pkgpyexecdir = /here/we/go
83 pkgpyexec_PYTHON = foo.py
84 END
86 $ACLOCAL
87 AUTOMAKE_fails -a
88 grep AM_PATH_PYTHON stderr
91 echo 6
92 # Ok.
94 cat > Makefile.am <<'END'
95 PYTHON = x
96 pkgpyexecdir = /here/we/go
97 pkgpyexec_PYTHON = foo.py
98 END
100 $ACLOCAL
101 $AUTOMAKE -a
102 test -f py-compile
105 echo 7
106 # Ok.
108 cat > Makefile.am <<'END'
109 PYTHON = x
110 fubardir = /here/we/go
111 fubar_PYTHON = foo.py
114 $ACLOCAL
115 $AUTOMAKE -a