source: trunk/essentials/sys-devel/automake-1.7/tests/nobase.test

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

automake 1.7.9

File size: 3.0 KB
Line 
1#! /bin/sh
2# Copyright (C) 2001, 2002 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 autoconf; 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# Make sure nobase_* works.
22
23required='libtoolize gcc'
24. ./defs || exit 1
25
26set -e
27
28cat >> configure.in <<'EOF'
29AC_PROG_CC
30AC_PROG_LIBTOOL
31AC_OUTPUT
32EOF
33
34cat > Makefile.am << 'EOF'
35foodir = $(prefix)/foo
36fooexecdir = $(prefix)/foo
37
38foo_HEADERS = sub/base.h
39nobase_foo_HEADERS = sub/nobase.h
40
41foo_DATA = sub/base.dat
42nobase_foo_DATA = sub/nobase.dat
43
44fooexec_SCRIPTS = sub/base.sh
45nobase_fooexec_SCRIPTS = sub/nobase.sh
46
47fooexec_PROGRAMS = sub/base
48nobase_fooexec_PROGRAMS = sub/nobase
49sub_base_SOURCES = source.c
50sub_nobase_SOURCES = source.c
51
52fooexec_LIBRARIES = sub/libbase.a
53nobase_fooexec_LIBRARIES = sub/libnobase.a
54sub_libbase_a_SOURCES = source.c
55sub_libnobase_a_SOURCES = source.c
56
57fooexec_LTLIBRARIES = sub/libbase.la
58nobase_fooexec_LTLIBRARIES = sub/libnobase.la
59sub_libbase_la_SOURCES = source2.c
60sub_libnobase_la_SOURCES = source2.c
61
62test-install-data: install-data
63 test -f inst/foo/sub/nobase.h
64 test ! -f inst/foo/nobase.h
65 test -f inst/foo/base.h
66 test -f inst/foo/sub/nobase.dat
67 test ! -f inst/foo/nobase.dat
68 test -f inst/foo/base.dat
69 test ! -f inst/foo/sub/pnobase.sh
70 test ! -f inst/foo/pbase.sh
71 test ! -f inst/foo/sub/pnobase$(EXEEXT)
72 test ! -f inst/foo/pbase$(EXEEXT)
73 test ! -f inst/foo/sub/libnobase.a
74 test ! -f inst/foo/libbase.a
75 test ! -f inst/foo/sub/libnobase.la
76 test ! -f inst/foo/libbase.la
77
78test-install-exec: install-exec
79 test -f inst/foo/sub/pnobase.sh
80 test ! -f inst/foo/pnobase.sh
81 test -f inst/foo/pbase.sh
82 test -f inst/foo/sub/pnobase$(EXEEXT)
83 test ! -f inst/foo/pnobase$(EXEEXT)
84 test -f inst/foo/pbase$(EXEEXT)
85 test -f inst/foo/sub/libnobase.a
86 test ! -f inst/foo/libnobase.a
87 test -f inst/foo/libbase.a
88 test -f inst/foo/sub/libnobase.la
89 test ! -f inst/foo/libnobase.la
90 test -f inst/foo/libbase.la
91EOF
92
93mkdir sub
94
95: > sub/base.h
96: > sub/nobase.h
97: > sub/base.dat
98: > sub/nobase.dat
99: > sub/base.sh
100: > sub/nobase.sh
101
102cat >source.c <<'EOF'
103int
104main (int argc, char *argv[])
105{
106 return 0;
107}
108EOF
109cp source.c source2.c
110
111libtoolize
112$ACLOCAL
113$AUTOCONF
114$AUTOMAKE -a
115./configure --prefix `pwd`/inst --program-prefix=p
116
117$MAKE
118$MAKE test-install-data
119$MAKE test-install-exec
120$MAKE uninstall
121
122test `find inst/foo -type f -print | wc -l` = 0
123
124$MAKE install-strip
Note: See TracBrowser for help on using the repository browser.