Merge branch 'test-extradep-fix'
[platform/upstream/automake.git] / tests / libobj10.test
1 #! /bin/sh
2 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2010, 2011 Free Software
3 # Foundation, Inc.
4 #
5 # This program is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 2, or (at your option)
8 # any later version.
9 #
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 # GNU General Public License for more details.
14 #
15 # You should have received a copy of the GNU General Public License
16 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
17
18 # Do not complain about the nonexistence of a source for LIBOBJS if
19 # it's in BUILT_SOURCES.  Reported by Erez Zadok.
20
21 . ./defs || Exit 1
22
23 cat >> configure.in << 'END'
24 AC_PROG_CC
25 AC_PROG_RANLIB
26 AC_LIBOBJ([foo])
27 AC_OUTPUT
28 END
29
30 cat > Makefile.am << 'END'
31 noinst_LIBRARIES = libfoo.a
32 libfoo_a_SOURCES =
33 libfoo_a_LIBADD = $(LIBOBJS)
34 BUILT_SOURCES = foo.c
35 CLEANFILES = foo.c
36 foo.c:
37         echo 'extern int dummy;' > $@
38 END
39
40 $ACLOCAL
41 $AUTOCONF
42 $AUTOMAKE
43
44 ./configure
45
46 $MAKE
47 ar t libfoo.a # for debugging
48 $MAKE distcheck
49
50 :