2 # Copyright (C) 2004, 2005 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)
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., 51 Franklin Street, Fifth Floor,
19 # Boston, MA 02110-1301, USA.
21 # Check that installation to directory with shell metacharacters succeed.
22 # Original report from James Amundson about file names with spaces.
23 # Other characters added by Paul Eggert.
25 # This is mostly the same input as nobase.test, but we do not use
26 # libtool libraries, because Libtool does not preserve space in
27 # file names (Issue observed with ltmain.sh (GNU libtool) 1.5a (1.1323
28 # 2003/11/10 21:06:47))
36 # Set up files that won't change each time through the loop.
38 cat >> configure.
in <<'EOF'
55 main (int argc, char **argv)
62 cat > Makefile.am
<< 'EOF'
63 foodir
= $
(prefix
)/foo
64 fooexecdir
= $
(prefix
)/foo
66 foo_HEADERS
= sub
/base.h
67 nobase_foo_HEADERS
= sub
/nobase.h
69 dist_foo_DATA
= sub
/base.dat
70 nobase_dist_foo_DATA
= sub
/nobase.dat
72 dist_fooexec_SCRIPTS
= sub
/base.sh
73 nobase_dist_fooexec_SCRIPTS
= sub
/nobase.sh
75 fooexec_PROGRAMS
= sub
/base
76 nobase_fooexec_PROGRAMS
= sub
/nobase
77 sub_base_SOURCES
= source.c
78 sub_nobase_SOURCES
= source.c
80 fooexec_LIBRARIES
= sub
/libbase.a
81 nobase_fooexec_LIBRARIES
= sub
/libnobase.a
82 sub_libbase_a_SOURCES
= source.c
83 sub_libnobase_a_SOURCES
= source.c
85 test-install-sep
: install
86 test -f '$(DESTDIR)/$(file)-prefix/foo/sub/nobase.h'
87 test ! -f '$(DESTDIR)/$(file)-prefix/foo/nobase.h'
88 test -f '$(DESTDIR)/$(file)-prefix/foo/base.h'
89 test -f '$(DESTDIR)/$(file)-prefix/foo/sub/nobase.dat'
90 test ! -f '$(DESTDIR)/$(file)-prefix/foo/nobase.dat'
91 test -f '$(DESTDIR)/$(file)-prefix/foo/base.dat'
92 test -f '$(DESTDIR)/$(file)-prefix/foo/sub/nobase.sh'
93 test ! -f '$(DESTDIR)/$(file)-prefix/foo/nobase.sh'
94 test -f '$(DESTDIR)/$(file)-prefix/foo/base.sh'
95 test -f '$(DESTDIR)/$(file)-prefix/foo/sub/nobase$(EXEEXT)'
96 test ! -f '$(DESTDIR)/$(file)-prefix/foo/nobase$(EXEEXT)'
97 test -f '$(DESTDIR)/$(file)-prefix/foo/base$(EXEEXT)'
98 test -f '$(DESTDIR)/$(file)-prefix/foo/sub/libnobase.a'
99 test ! -f '$(DESTDIR)/$(file)-prefix/foo/libnobase.a'
100 test -f '$(DESTDIR)/$(file)-prefix/foo/libbase.a'
107 # Some control characters that are white space:
108 # back space, carriage return, form feed, horizontal tab, line feed, space
121 '!' '"' '#' '$' '%' '&' \' '(' ')' '*' '+' ',' '-' ':' ';' \
122 '<' '=' '>' '?' '@' '[' '\' ']' '^
' '`' '{' '|' '}' '~' \
123 "$bs" "$cr" "$ff" "$ht" "$lf" "$sp" \
124 '@<:@' '@:>@' '@S|@' '@%:@' '@&t@' \
125 "a${sp}b" "a${sp}${sp}b" "a${lf}b" ... a:
127 for test in build install; do
137 # Make sure this system supports this character in file names.
138 mkdir sub1 "./$file" || exit 77
142 ../configure --prefix "/$file-prefix" &&
144 DESTDIR=$dest file=$file $MAKE -e test-install-sep ||
145 eval "${test}_failures=\"\$${test}_failures$lf\$file\""
149 rm -fr sub1 "./$file"
153 # The list of the above file names that cannot be used as a build directory
154 # on a POSIX host. This list should be empty, but is not due to limitations
155 # in Autoconf, Automake, Make, or M4.
156 expected_build_failures='
168 # Similarly, the list of file names that cannot be used as an install directory
169 # on a POSIX host. This list should also be empty.
170 expected_install_failures='
181 for test in build install; do
182 eval failures=\$${test}_failures
186 $0: $test test failed for the following file names:$failures
188 eval test \"\$failures\" = \"\$expected_${test}_failures\" || fail=1