| 1 | #! /bin/sh
|
|---|
| 2 | # Copyright (C) 2002, 2003 Free Software Foundation, Inc.
|
|---|
| 3 | #
|
|---|
| 4 | # This file is part of GNU Automake.
|
|---|
| 5 | #
|
|---|
| 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.
|
|---|
| 10 | #
|
|---|
| 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.
|
|---|
| 15 | #
|
|---|
| 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.
|
|---|
| 20 |
|
|---|
| 21 | # Make sure that Automake suggests using AM_PATH_PYTHON.
|
|---|
| 22 |
|
|---|
| 23 | . ./defs || exit 1
|
|---|
| 24 |
|
|---|
| 25 | set -e
|
|---|
| 26 |
|
|---|
| 27 | echo 1
|
|---|
| 28 | # pythondir not defined
|
|---|
| 29 |
|
|---|
| 30 | cat > Makefile.am <<'END'
|
|---|
| 31 | PYTHON = x
|
|---|
| 32 | python_PYTHON = foo.py
|
|---|
| 33 | END
|
|---|
| 34 |
|
|---|
| 35 | $ACLOCAL
|
|---|
| 36 | AUTOMAKE_fails -a
|
|---|
| 37 | grep AM_PATH_PYTHON stderr
|
|---|
| 38 |
|
|---|
| 39 | echo 2
|
|---|
| 40 | # pkgpythondir not defined
|
|---|
| 41 |
|
|---|
| 42 | cat > Makefile.am <<'END'
|
|---|
| 43 | PYTHON = x
|
|---|
| 44 | pkgpython_PYTHON = foo.py
|
|---|
| 45 | END
|
|---|
| 46 |
|
|---|
| 47 | $ACLOCAL
|
|---|
| 48 | AUTOMAKE_fails -a
|
|---|
| 49 | grep AM_PATH_PYTHON stderr
|
|---|
| 50 |
|
|---|
| 51 |
|
|---|
| 52 | echo 3
|
|---|
| 53 | # pyexecdir not defined
|
|---|
| 54 |
|
|---|
| 55 | cat > Makefile.am <<'END'
|
|---|
| 56 | PYTHON = x
|
|---|
| 57 | pyexec_PYTHON = foo.py
|
|---|
| 58 | END
|
|---|
| 59 |
|
|---|
| 60 | $ACLOCAL
|
|---|
| 61 | AUTOMAKE_fails -a
|
|---|
| 62 | grep AM_PATH_PYTHON stderr
|
|---|
| 63 |
|
|---|
| 64 |
|
|---|
| 65 | echo 4
|
|---|
| 66 | # pkgpyexecdir not defined
|
|---|
| 67 |
|
|---|
| 68 | cat > Makefile.am <<'END'
|
|---|
| 69 | PYTHON = x
|
|---|
| 70 | pkgpyexec_PYTHON = foo.py
|
|---|
| 71 | END
|
|---|
| 72 |
|
|---|
| 73 | $ACLOCAL
|
|---|
| 74 | AUTOMAKE_fails -a
|
|---|
| 75 | grep AM_PATH_PYTHON stderr
|
|---|
| 76 |
|
|---|
| 77 |
|
|---|
| 78 | echo 5
|
|---|
| 79 | # PYTHON not defined.
|
|---|
| 80 |
|
|---|
| 81 | cat > Makefile.am <<'END'
|
|---|
| 82 | pkgpyexecdir = /here/we/go
|
|---|
| 83 | pkgpyexec_PYTHON = foo.py
|
|---|
| 84 | END
|
|---|
| 85 |
|
|---|
| 86 | $ACLOCAL
|
|---|
| 87 | AUTOMAKE_fails -a
|
|---|
| 88 | grep AM_PATH_PYTHON stderr
|
|---|
| 89 |
|
|---|
| 90 |
|
|---|
| 91 | echo 6
|
|---|
| 92 | # Ok.
|
|---|
| 93 |
|
|---|
| 94 | cat > Makefile.am <<'END'
|
|---|
| 95 | PYTHON = x
|
|---|
| 96 | pkgpyexecdir = /here/we/go
|
|---|
| 97 | pkgpyexec_PYTHON = foo.py
|
|---|
| 98 | END
|
|---|
| 99 |
|
|---|
| 100 | $ACLOCAL
|
|---|
| 101 | $AUTOMAKE -a
|
|---|
| 102 | test -f py-compile
|
|---|
| 103 |
|
|---|
| 104 |
|
|---|
| 105 | echo 7
|
|---|
| 106 | # Ok.
|
|---|
| 107 |
|
|---|
| 108 | cat > Makefile.am <<'END'
|
|---|
| 109 | PYTHON = x
|
|---|
| 110 | fubardir = /here/we/go
|
|---|
| 111 | fubar_PYTHON = foo.py
|
|---|
| 112 | END
|
|---|
| 113 |
|
|---|
| 114 | $ACLOCAL
|
|---|
| 115 | $AUTOMAKE -a
|
|---|