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

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

automake 1.7.9

File size: 1.5 KB
Line 
1#! /bin/sh
2# Copyright (C) 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# Check subpackage handling.
22
23required=gcc
24. ./defs || exit 1
25
26set -e
27
28cat >>configure.in <<'END'
29AC_CONFIG_SUBDIRS([lib])
30AC_PROG_CC
31AC_OUTPUT
32END
33
34cat >Makefile.am <<'EOF'
35SUBDIRS = lib
36# Yes, This program is named LDADD. So what?
37bin_PROGRAMS = LDADD
38LDADD_LDADD = lib/liblib.a
39EOF
40
41cat >LDADD.c <<'EOF'
42int lib ();
43
44int
45main ()
46{
47 return lib ();
48}
49EOF
50
51mkdir lib
52mkdir lib/src
53
54cat >lib/configure.ac <<'EOF'
55AC_INIT([lib], [2.3])
56AM_INIT_AUTOMAKE
57AC_PROG_CC
58AC_PROG_RANLIB
59AC_CONFIG_FILES([Makefile])
60AC_OUTPUT
61EOF
62
63cat >lib/Makefile.am <<'EOF'
64noinst_LIBRARIES = liblib.a
65liblib_a_SOURCES = src/x.c
66EOF
67
68cat >lib/src/x.c <<'EOF'
69int lib ()
70{
71 return 0;
72}
73EOF
74
75$ACLOCAL
76$AUTOCONF
77$AUTOMAKE
78
79cd lib
80$ACLOCAL
81$AUTOCONF
82$AUTOMAKE
83cd ..
84
85./configure
86$MAKE distcheck
Note: See TracBrowser for help on using the repository browser.