source: trunk/essentials/sys-devel/automake-1.8/tests/instspc.test

Last change on this file was 3118, checked in by bird, 18 years ago

automake 1.8.5

File size: 3.0 KB
Line 
1#! /bin/sh
2# Copyright (C) 2004 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# Check that installation to directory with spaces succeed.
22# Report from James Amundson.
23
24# This is mostly the same input as nobase.test, but we do not use
25# libtool libraries, because Libtool does not preserve space in
26# filenames (Issue observed with ltmain.sh (GNU libtool) 1.5a (1.1323
27# 2003/11/10 21:06:47))
28
29
30required='gcc'
31. ./defs || exit 1
32
33set -e
34
35# Make sure this system supports spaces in filenames.
36mkdir 'a b' || exit 77
37
38cat >> configure.in <<'EOF'
39AC_PROG_CC
40AC_PROG_RANLIB
41AC_OUTPUT
42EOF
43
44cat > Makefile.am << 'EOF'
45foodir = $(prefix)/foo
46fooexecdir = $(prefix)/foo
47
48foo_HEADERS = sub/base.h
49nobase_foo_HEADERS = sub/nobase.h
50
51dist_foo_DATA = sub/base.dat
52nobase_dist_foo_DATA = sub/nobase.dat
53
54dist_fooexec_SCRIPTS = sub/base.sh
55nobase_dist_fooexec_SCRIPTS = sub/nobase.sh
56
57fooexec_PROGRAMS = sub/base
58nobase_fooexec_PROGRAMS = sub/nobase
59sub_base_SOURCES = source.c
60sub_nobase_SOURCES = source.c
61
62fooexec_LIBRARIES = sub/libbase.a
63nobase_fooexec_LIBRARIES = sub/libnobase.a
64sub_libbase_a_SOURCES = source.c
65sub_libnobase_a_SOURCES = source.c
66
67test-install-space: install
68 test -f "$(DESTDIR)/more space/foo/sub/nobase.h"
69 test ! -f "$(DESTDIR)/more space/foo/nobase.h"
70 test -f "$(DESTDIR)/more space/foo/base.h"
71 test -f "$(DESTDIR)/more space/foo/sub/nobase.dat"
72 test ! -f "$(DESTDIR)/more space/foo/nobase.dat"
73 test -f "$(DESTDIR)/more space/foo/base.dat"
74 test -f "$(DESTDIR)/more space/foo/sub/nobase.sh"
75 test ! -f "$(DESTDIR)/more space/foo/nobase.sh"
76 test -f "$(DESTDIR)/more space/foo/base.sh"
77 test -f "$(DESTDIR)/more space/foo/sub/nobase$(EXEEXT)"
78 test ! -f "$(DESTDIR)/more space/foo/nobase$(EXEEXT)"
79 test -f "$(DESTDIR)/more space/foo/base$(EXEEXT)"
80 test -f "$(DESTDIR)/more space/foo/sub/libnobase.a"
81 test ! -f "$(DESTDIR)/more space/foo/libnobase.a"
82 test -f "$(DESTDIR)/more space/foo/libbase.a"
83EOF
84
85mkdir sub
86
87: > sub/base.h
88: > sub/nobase.h
89: > sub/base.dat
90: > sub/nobase.dat
91: > sub/base.sh
92: > sub/nobase.sh
93
94cat >source.c <<'EOF'
95int
96main (int argc, char *argv[])
97{
98 return 0;
99}
100EOF
101cp source.c source2.c
102
103$ACLOCAL
104$AUTOCONF
105$AUTOMAKE -a
106
107mkdir build
108cd build
109
110../configure --prefix '/more space'
111$MAKE
112dest=`pwd`/'with space';
113DESTDIR="$dest" $MAKE -e test-install-space
Note: See TracBrowser for help on using the repository browser.