2002-02-18 Paul Eggert <eggert@twinsun.com>
[platform/upstream/automake.git] / tests / suffix2.test
1 #! /bin/sh
2
3 # Test to make sure .c.o rule is only included once.
4 required=libtoolize
5
6 . $srcdir/defs || exit 1
7
8 cat >> configure.in << 'END'
9 AC_PROG_CC
10 AC_PROG_LIBTOOL
11 END
12
13 cat > Makefile.am << 'END'
14 AUTOMAKE_OPTIONS = no-dependencies
15 lib_LTLIBRARIES = libltdl.la
16 libltdl_la_SOURCES = ltdl.c ltdl.h
17 END
18
19 : > ltdl.c
20 : > ltdl.h
21
22 # Create all the files created libtoolize so we don't run libtoolize.
23 # We don't want the user to need libtool to run this test.
24 : > ltconfig
25 : > ltmain.sh
26 : > config.guess
27 : > config.sub
28
29 set -e
30
31 $ACLOCAL -I $aclocaldir || exit 1
32 $AUTOMAKE -a
33
34 grep -c '^\.c\.o:' Makefile.in   | grep '^1$'
35 grep -c '^\.c\.obj:' Makefile.in | grep '^1$'
36
37 exit 0