]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
* automake.in (handle_languages): Do not define DEP_FILES.
authorAlexandre Duret-Lutz <adl@gnu.org>
Thu, 1 Jan 2004 21:57:24 +0000 (21:57 +0000)
committerAlexandre Duret-Lutz <adl@gnu.org>
Thu, 1 Jan 2004 21:57:24 +0000 (21:57 +0000)
* 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.

ChangeLog
automake.in
m4/depout.m4
tests/depend.test
tests/depend4.test
tests/exsource.test

index 22fc55f94d1008422afa56a14321d5ea02a394c5..2ea6f49ef90eb4e106aa52ec81ee4b94b74016b4 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
 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.
index ff44414834c60122c22e5f71844950a5e25a15e9..dc54b44577afa183ae6ece10f8180b5f7680af70 100755 (executable)
@@ -1005,14 +1005,6 @@ sub handle_languages
            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
index 7d899f0ca4d643b00deccff8fd65981a0db229a0..27cf6abc0dfff4de7d0100fe3d9be28881be0350 100644 (file)
@@ -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
index 99862007e2cb7e139763861845d17b24565319fe..99e1ccb93e1e97345dc9a3342a520ba23dd70be9 100755 (executable)
@@ -1,5 +1,5 @@
 #! /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.
 #
@@ -24,6 +24,8 @@
 
 . ./defs || exit 1
 
+set -e
+
 echo AC_PROG_CC >> configure.in
 
 cat > Makefile.am << 'END'
@@ -32,9 +34,7 @@ fred_SOURCES = \
    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`
index 4a1d4f80075a5805d3ad561ec38b13b6556ac54a..6f156f068e1bb375d6ca30e2773d1c64f0b181cf 100755 (executable)
@@ -1,5 +1,5 @@
 #! /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
@@ -35,9 +37,7 @@ bin_PROGRAMS = fred
 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
index 46f7a230844263ed64379710ccd7aafe5a166efc..44737ec957a56d47c2d540f3af9fb669f616fa54 100755 (executable)
@@ -1,5 +1,5 @@
 #! /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