2004-01-01 Alexandre Duret-Lutz <adl@gnu.org>
+ * automake.in (handle_languages): Do not define DEP_FILES.
+ * m4/depout.m4 (_AM_OUTPUT_DEPENDENCY_COMMANDS): Extract included
+ files with $(DEPDIR) in their name instead of DEP_FILES.
+ * tests/depend.test, tests/depend4.test, tests/exsource.test:
+ Adjust.
+ Suggested by Tom Tromey.
+
Do not output .lo rules for programs and static libraries objects,
and do not output .o/.obj rules for libtool libraries. This is
about explicit rules only, not inference rules.
require_conf_file ("$am_file.am", FOREIGN, 'depcomp');
my @deplist = sort keys %dep_files;
-
- # We define this as a conditional variable because BSD
- # make can't handle backslashes for continuing comments on
- # the following line.
- define_pretty_variable ('DEP_FILES',
- new Automake::Condition ('AMDEP_TRUE'),
- INTERNAL, @deplist);
-
# Generate each `include' individually. Irix 6 make will
# not properly include several files resulting from a
# variable expansion; generating many separate includes
# Generate code to set up dependency tracking. -*- Autoconf -*-
-# Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004
+# Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
else
continue
fi
- grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue
- # Extract the definition of DEP_FILES from the Makefile without
- # running `make'.
+ # Extract the definition of DEPDIR, am__include, and am__quote
+ # from the Makefile without running `make'.
DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
test -z "$DEPDIR" && continue
+ am__include=`sed -n -e '/^am__include = / s///p' < "$mf"`
+ test -z "am__include" && continue
+ am__quote=`sed -n -e '/^am__quote = / s///p' < "$mf"`
# When using ansi2knr, U may be empty or an underscore; expand it
U=`sed -n -e '/^U = / s///p' < "$mf"`
- test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
- # We invoke sed twice because it is the simplest approach to
- # changing $(DEPDIR) to its actual value in the expansion.
- for file in `sed -n -e '
- /^DEP_FILES = .*\\\\$/ {
- s/^DEP_FILES = //
- :loop
- s/\\\\$//
- p
- n
- /\\\\$/ b loop
- p
- }
- /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
+ # Find all dependency output files, they are included files with
+ # $(DEPDIR) in their names. We invoke sed twice because it is the
+ # simplest approach to changing $(DEPDIR) to its actual value in the
+ # expansion.
+ for file in `sed -n -e "
+ s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
# Make sure the directory exists.
test -f "$dirpart/$file" && continue
#! /bin/sh
-# Copyright (C) 1996, 1997, 1999, 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 1996, 1997, 1999, 2001, 2002, 2004 Free Software Foundation, Inc.
#
# This file is part of GNU Automake.
#
. ./defs || exit 1
+set -e
+
echo AC_PROG_CC >> configure.in
cat > Makefile.am << 'END'
fred.c
END
-$ACLOCAL || exit 1
-$AUTOMAKE || exit 1
+$ACLOCAL
+$AUTOMAKE
-# In this case we no longer expect to find DEP_FILES.
-grep '^DEP_FILES = *$' Makefile.in && exit 1
-exit 0
+test 1 = `grep '^@AMDEP_TRUE@@am__include@' Makefile.in | wc -l`
#! /bin/sh
-# Copyright (C) 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2004 Free Software Foundation, Inc.
#
# This file is part of GNU Automake.
#
# the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
-# check that 'DEP_FILES' is defined when there are many header files
+# Check that dependencies are included when there are many header files.
. ./defs || exit 1
+set -e
+
echo AC_PROG_CC >> configure.in
-$ACLOCAL || exit 1
+$ACLOCAL
headers=
for header in one.h two.h three.h four.h five.h six.h
fred_SOURCES = fred1.c $headers
END
- $AUTOMAKE || exit 1
+ $AUTOMAKE
- $EGREP '^(@[^@]+@)*DEP_FILES = ' Makefile.in || exit 1
+ test 1 = `grep '^@AMDEP_TRUE@@am__include@' Makefile.in | wc -l`
done
-
-exit 0
#! /bin/sh
-# Copyright (C) 1996, 1997, 1998, 1999, 2001, 2002
+# Copyright (C) 1996, 1997, 1998, 1999, 2001, 2002, 2004
# Free Software Foundation, Inc.
#
# This file is part of GNU Automake.
# Test to make sure EXTRA_..._SOURCES actually works.
# Bug report from Henrik Frystyk Nielsen.
-required=GNUmake
. ./defs || exit 1
-cat >> configure.in << 'END'
-AC_PROG_CC
-END
+set -e
+
+echo AC_PROG_CC >> configure.in
cat > Makefile.am << 'END'
bin_PROGRAMS = www
www_SOURCES = www.c
EXTRA_www_SOURCES = xtra.c
www_LDADD = @extra_stuff@
-magic:
- @echo $(DEP_FILES)
END
: > www.c
: > xtra.c
-$ACLOCAL || exit 1
-$AUTOMAKE || exit 1
+$ACLOCAL
+$AUTOMAKE
grep '@am__include@ .*/xtra\.P' Makefile.in