Clarify overriding of `*_DEPENDENCIES' in LIBOBJS node.
[automake/ericb.git] / tests / nobase-python.test
blobe7e857ec007088bdf51675c11008aeb81cfea695
1 #! /bin/sh
2 # Copyright (C) 2008 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 3, 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 <http://www.gnu.org/licenses/>.
17 # Make sure nobase_* works for python files.
19 required=python
20 . ./defs || Exit 1
22 set -e
24 cat >>configure.in <<EOF
25 AM_PATH_PYTHON
26 AC_OUTPUT
27 EOF
29 cat > Makefile.am <<'END'
30 mydir=$(prefix)/my
31 my_PYTHON = one.py sub/base.py
32 nobase_my_PYTHON = two.py sub/nobase.py
34 test-install-data: install-data
35 test -f inst/my/one.py
36 test -f inst/my/one.pyc
37 test -f inst/my/two.py
38 test -f inst/my/two.pyc
39 test -f inst/my/base.py
40 test -f inst/my/base.pyc
41 test -f inst/my/sub/nobase.py
42 test -f inst/my/sub/nobase.pyc
43 test ! -f inst/my/nobase.py
44 test ! -f inst/my/nobase.pyc
45 END
47 mkdir sub
49 for file in one.py sub/base.py two.py sub/nobase.py
51 echo 'def one(): return 1' >$file
52 done
54 $ACLOCAL
55 $AUTOCONF
56 $AUTOMAKE --add-missing
58 mkdir inst
59 inst=`pwd`/inst
61 ./configure --prefix "`pwd`/inst" --program-prefix=p
63 $MAKE
64 $MAKE test-install-data
65 $MAKE uninstall
67 test `find inst/my -type f -print | wc -l` = 0
69 $MAKE install-strip
71 # Likewise, in a VPATH build.
73 $MAKE uninstall
74 $MAKE distclean
75 mkdir build
76 cd build
77 ../configure --prefix "`pwd`/inst" --program-prefix=p
78 $MAKE
79 $MAKE test-install-data
80 $MAKE uninstall
81 test `find inst/my -type f -print | wc -l` = 0