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

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

automake 1.7.9

File size: 1.9 KB
Line 
1#! /bin/sh
2# Copyright (C) 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# Make sure dependencies on aclocal.m4 are set correctly.
22# Report from Jim Meyering.
23
24# We need GNU make for the `rebuild rules' to be triggered.
25required=GNUmake
26. ./defs || exit 1
27
28set -e
29
30cat >>configure.in <<EOF
31AC_PROG_RANLIB
32AC_PROG_CC
33MY_MACRO
34AC_CONFIG_FILES([lib/Makefile])
35AC_OUTPUT
36EOF
37
38mkdir m4
39cat >m4/mymacro.m4 <<EOF
40AC_DEFUN([MY_MACRO], [])
41EOF
42
43mkdir lib
44: > lib/foo.c
45: > lib/bar.c
46cat >lib/Makefile.am <<'EOF'
47noinst_LIBRARIES = liberi.a
48liberi_a_SOURCES = bar.c
49liberi_a_LIBADD = $(LIBOBJS)
50EOF
51
52cat >Makefile.am <<'EOF'
53SUBDIRS = lib
54EXTRA_DIST = m4/mymacro.m4
55ACLOCAL_AMFLAGS = -I m4
56check-foo: distdir
57 test -f $(distdir)/lib/foo.c
58 test -f $(distdir)/lib/bar.c
59
60check-not-foo: distdir
61 test ! -f $(distdir)/lib/foo.c
62 test -f $(distdir)/lib/bar.c
63EOF
64
65$ACLOCAL -I m4
66$AUTOCONF
67$AUTOMAKE
68./configure
69$MAKE check-not-foo
70
71# Update one of the macros. This should cause ./configure, Makefile.in,
72# Makefile, lib/Makefile.in, and lib/Makfile to be updated. This assumes
73# GNU make.
74
75cat >m4/mymacro.m4 <<'EOF'
76AC_DEFUN([MY_MACRO], [AC_LIBOBJ([foo])])
77EOF
78
79$MAKE check-foo
Note: See TracBrowser for help on using the repository browser.