summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorAlexandre Duret-Lutz <adl@gnu.org>2004-01-01 21:57:24 +0000
committerAlexandre Duret-Lutz <adl@gnu.org>2004-01-01 21:57:24 +0000
commit25c57a7e44b53c3d97b92b8ca111c0027e2bce36 (patch)
treed8a3c48a9395d16689d9ef70125965390d661edb /m4
parentd82b453e871918a7a51bb5fdd32f51cdabe53eb8 (diff)
downloadautomake-25c57a7e44b53c3d97b92b8ca111c0027e2bce36.tar.gz
* 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.
Diffstat (limited to 'm4')
-rw-r--r--m4/depout.m431
1 files changed, 13 insertions, 18 deletions
diff --git a/m4/depout.m4 b/m4/depout.m4
index 7d899f0ca..27cf6abc0 100644
--- a/m4/depout.m4
+++ b/m4/depout.m4
@@ -1,6 +1,7 @@
# 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
@@ -36,27 +37,21 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
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