2 # Copyright (C) 2001, 2002, 2004, 2005, 2006, 2007 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)
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.
19 required
='libtoolize gcc'
24 cat >> configure.
in <<'EOF'
30 cat > Makefile.am
<< 'EOF'
31 foodir
= $
(prefix
)/foo
32 fooexecdir
= $
(prefix
)/foo
34 foo_HEADERS
= sub
/base.h
35 nobase_foo_HEADERS
= sub
/nobase.h
37 dist_foo_DATA
= sub
/base.dat
38 nobase_dist_foo_DATA
= sub
/nobase.dat
40 dist_fooexec_SCRIPTS
= sub
/base.sh
41 nobase_dist_fooexec_SCRIPTS
= sub
/nobase.sh
43 fooexec_PROGRAMS
= sub
/base
44 nobase_fooexec_PROGRAMS
= sub
/nobase
45 sub_base_SOURCES
= source.c
46 sub_nobase_SOURCES
= source.c
48 fooexec_LIBRARIES
= sub
/libbase.a
49 nobase_fooexec_LIBRARIES
= sub
/libnobase.a
50 sub_libbase_a_SOURCES
= source.c
51 sub_libnobase_a_SOURCES
= source.c
53 fooexec_LTLIBRARIES
= sub
/libbase.la
54 nobase_fooexec_LTLIBRARIES
= sub
/libnobase.la
55 sub_libbase_la_SOURCES
= source2.c
56 sub_libnobase_la_SOURCES
= source2.c
58 test-install-data
: install-data
59 test -f inst
/foo
/sub
/nobase.h
60 test ! -f inst
/foo
/nobase.h
61 test -f inst
/foo
/base.h
62 test -f inst
/foo
/sub
/nobase.dat
63 test ! -f inst
/foo
/nobase.dat
64 test -f inst
/foo
/base.dat
65 test ! -f inst
/foo
/sub
/pnobase.sh
66 test ! -f inst
/foo
/pbase.sh
67 test ! -f inst
/foo
/sub
/pnobase$
(EXEEXT
)
68 test ! -f inst
/foo
/pbase$
(EXEEXT
)
69 test ! -f inst
/foo
/sub
/libnobase.a
70 test ! -f inst
/foo
/libbase.a
71 test ! -f inst
/foo
/sub
/libnobase.la
72 test ! -f inst
/foo
/libbase.la
74 test-install-exec
: install-exec
75 test -f inst
/foo
/sub
/pnobase.sh
76 test ! -f inst
/foo
/pnobase.sh
77 test -f inst
/foo
/pbase.sh
78 test -f inst
/foo
/sub
/pnobase$
(EXEEXT
)
79 test ! -f inst
/foo
/pnobase$
(EXEEXT
)
80 test -f inst
/foo
/pbase$
(EXEEXT
)
81 test -f inst
/foo
/sub
/libnobase.a
82 test ! -f inst
/foo
/libnobase.a
83 test -f inst
/foo
/libbase.a
84 test -f inst
/foo
/sub
/libnobase.la
85 test ! -f inst
/foo
/libnobase.la
86 test -f inst
/foo
/libbase.la
100 main (int argc, char *argv[])
105 cp source.c source2.c
113 .
/configure
--prefix "`pwd`/inst" --program-prefix=p
116 $MAKE test-install-data
117 $MAKE test-install-exec
120 test `find inst/foo -type f -print | wc -l` = 0
124 # Likewise, in a VPATH build.
130 ..
/configure
--prefix "`pwd`/inst" --program-prefix=p
132 $MAKE test-install-data
133 $MAKE test-install-exec
135 test `find inst/foo -type f -print | wc -l` = 0