2 # Copyright (C) 2001, 2002, 2004, 2005, 2006, 2007, 2008 Free Software
5 # This program is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 3, or (at your option)
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
15 # You should have received a copy of the GNU General Public License
16 # along with this program. If not, see <http://www.gnu.org/licenses/>.
18 # Make sure nobase_* works.
25 cat >> configure.
in <<'EOF'
31 cat > Makefile.am
<< 'EOF'
32 foodir
= $
(prefix
)/foo
33 fooexecdir
= $
(prefix
)/foo
35 foo_HEADERS
= sub
/base.h sub
/base-gen.h
36 nobase_foo_HEADERS
= sub
/nobase.h sub
/nobase-gen.h
38 dist_foo_DATA
= sub
/base.dat sub
/base-gen.dat
39 nobase_dist_foo_DATA
= sub
/nobase.dat sub
/nobase-gen.dat
41 dist_fooexec_SCRIPTS
= sub
/base.sh sub
/base-gen.sh
42 nobase_dist_fooexec_SCRIPTS
= sub
/nobase.sh sub
/nobase-gen.sh
44 fooexec_PROGRAMS
= sub
/base
45 nobase_fooexec_PROGRAMS
= sub
/nobase
46 sub_base_SOURCES
= source.c
47 sub_nobase_SOURCES
= source.c
49 fooexec_LIBRARIES
= sub
/libbase.a
50 nobase_fooexec_LIBRARIES
= sub
/libnobase.a
51 sub_libbase_a_SOURCES
= source.c
52 sub_libnobase_a_SOURCES
= source.c
54 generated_files
= sub
/base-gen.h sub
/nobase-gen.h sub
/base-gen.dat \
55 sub
/nobase-gen.dat sub
/base-gen.sh sub
/nobase-gen.sh
58 echo "generated file $@" > $@
60 CLEANFILES
= $
(generated_files
)
62 test-install-data
: install-data
63 test -f inst
/foo
/sub
/nobase.h
64 test ! -f inst
/foo
/nobase.h
65 test -f inst
/foo
/sub
/nobase-gen.h
66 test ! -f inst
/foo
/nobase-gen.h
67 test -f inst
/foo
/base.h
68 test -f inst
/foo
/base-gen.h
69 test -f inst
/foo
/sub
/nobase.dat
70 test ! -f inst
/foo
/nobase.dat
71 test -f inst
/foo
/sub
/nobase-gen.dat
72 test ! -f inst
/foo
/nobase-gen.dat
73 test -f inst
/foo
/base.dat
74 test -f inst
/foo
/base-gen.dat
75 test ! -f inst
/foo
/sub
/pnobase.sh
76 test ! -f inst
/foo
/sub
/pnobase-gen.sh
77 test ! -f inst
/foo
/pbase.sh
78 test ! -f inst
/foo
/pbase-gen.sh
79 test ! -f inst
/foo
/sub
/pnobase$
(EXEEXT
)
80 test ! -f inst
/foo
/pbase$
(EXEEXT
)
81 test ! -f inst
/foo
/sub
/libnobase.a
82 test ! -f inst
/foo
/libbase.a
84 test-install-exec
: install-exec
85 test -f inst
/foo
/sub
/pnobase.sh
86 test ! -f inst
/foo
/pnobase.sh
87 test -f inst
/foo
/sub
/pnobase-gen.sh
88 test ! -f inst
/foo
/pnobase-gen.sh
89 test -f inst
/foo
/pbase.sh
90 test -f inst
/foo
/pbase-gen.sh
91 test -f inst
/foo
/sub
/pnobase$
(EXEEXT
)
92 test ! -f inst
/foo
/pnobase$
(EXEEXT
)
93 test -f inst
/foo
/pbase$
(EXEEXT
)
94 test -f inst
/foo
/sub
/libnobase.a
95 test ! -f inst
/foo
/libnobase.a
96 test -f inst
/foo
/libbase.a
108 cat >source.c
<<'EOF'
110 main (int argc, char *argv[])
115 cp source.c source2.c
122 .
/configure
--prefix "`pwd`/inst" --program-prefix=p
125 $MAKE test-install-data
126 $MAKE test-install-exec
129 test `find inst/foo -type f -print | wc -l` = 0
133 # Likewise, in a VPATH build.
139 ..
/configure
--prefix "`pwd`/inst" --program-prefix=p
141 $MAKE test-install-data
142 $MAKE test-install-exec
144 test `find inst/foo -type f -print | wc -l` = 0