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

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

automake 1.8.5

File size: 2.3 KB
Line 
1#! /bin/sh
2# Copyright (C) 2002, 2003 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# Test for locations in error messages.
22
23. ./defs || exit 1
24
25set -e
26
27cat >> configure.in << 'END'
28AM_CONDITIONAL([COND1], [true])
29AM_CONDITIONAL([COND2], [true])
30AC_PROG_CC
31AC_PROG_RANLIB
32END
33
34cat > Makefile.am << 'END'
35bin_PROGRAMS = libfoo.a
36if COND2
37 lib_LIBRARIES = libfoo.a
38endif
39if COND1
40 bin_PROGRAMS += ctags
41endif
42VAR = 1 \
43 2 \
44 3
45
46VAR = 1 \
47 2 \
48 3
49END
50
51$ACLOCAL
52AUTOMAKE_fails
53
54# Smash the useless difference of lib file locations.
55sed 's,^.*lib/am/\([a-z]*\.am\),\1,' stderr >observed
56cat >expected <<\EOF
57Makefile.am:12: VAR multiply defined in condition TRUE ...
58Makefile.am:8: ... `VAR' previously defined here
59automake: libfoo_a_OBJECTS should not be defined
60Makefile.am:3: while processing library `libfoo.a'
61automake: use `libfoo_a_LDADD', not `libfoo_a_LIBADD'
62Makefile.am:3: while processing library `libfoo.a'
63library.am: deprecated feature: target `libfoo.a' overrides `libfoo.a$(EXEEXT)'
64library.am: change your target to read `libfoo.a$(EXEEXT)'
65Makefile.am:3: while processing library `libfoo.a'
66program.am: target `libfoo.a$(EXEEXT)' was defined here
67Makefile.am:1: while processing program `libfoo.a'
68program.am: redefinition of `libfoo.a$(EXEEXT)'...
69Makefile.am:1: while processing program `libfoo.a'
70library.am: ... `libfoo.a' previously defined here
71Makefile.am:3: while processing library `libfoo.a'
72tags.am: redefinition of `ctags'...
73program.am: ... `ctags$(EXEEXT)' previously defined here
74Makefile.am:6: while processing program `ctags'
75EOF
76
77diff expected observed || exit 1
Note: See TracBrowser for help on using the repository browser.