]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
2001-06-29 Raja R Harinath <harinath@cs.umn.edu>
authorTom Tromey <tromey@redhat.com>
Fri, 29 Jun 2001 06:55:25 +0000 (06:55 +0000)
committerTom Tromey <tromey@redhat.com>
Fri, 29 Jun 2001 06:55:25 +0000 (06:55 +0000)
* automake.in (saw_sources_p): Work even if there are more
than one header files, and more than of one type of header.
* tests/Makefile.am (TESTS): Added new file.
* tests/depend4.test: New file.

ChangeLog
automake.in
tests/Makefile.am
tests/Makefile.in
tests/depend4.test [new file with mode: 0755]

index 8ba356285200e37c9bf7e021eae77f78e9cd98b2..7e81f973559e470d0659ac142bea12676533f4c6 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2001-06-29  Raja R Harinath  <harinath@cs.umn.edu>
+
+       * automake.in (saw_sources_p): Work even if there are more
+       than one header files, and more than of one type of header.
+       * tests/Makefile.am (TESTS): Added new file.
+       * tests/depend4.test: New file.
+
 2001-06-28  Tom Tromey  <tromey@redhat.com>
 
        * lib/am/libs.am (RANLIB): Don't define.
index a1e1979b3d69bf02c51512bbd0be3a9aee3738d3..23d75313bd7d2916d6bcce7a4d673e804c17eaed 100755 (executable)
@@ -5232,16 +5232,19 @@ sub saw_sources_p
 {
     my ($headers) = @_;
 
-    if ($headers)
+    # count all the sources
+    my $count = 0;
+    foreach my $val (values %extension_seen) 
     {
-       $headers = 0;
+       $count += $val;
     }
-    else
+
+    if (!$headers) 
     {
-       $headers = count_files_for_language ('header');
+       $count -= count_files_for_language ('header');
     }
 
-    return scalar keys %extension_seen > $headers;
+    return $count > 0;
 }
 
 
index 0025cccc01e1da29cd0cfec180cdef9611a60441..bfbb842282eb2091d4027986544f2992cbc47447 100644 (file)
@@ -98,6 +98,7 @@ depcomp2.test \
 depend.test \
 depend2.test \
 depend3.test \
+depend4.test \
 discover.test \
 distcommon.test \
 distdir.test \
index d077c99efd54b799ad9218441308d7f813e64569..e5d18308aa99ca0117a2379c78708ea36a476466 100644 (file)
@@ -164,6 +164,7 @@ depcomp2.test \
 depend.test \
 depend2.test \
 depend3.test \
+depend4.test \
 discover.test \
 distcommon.test \
 distdir.test \
diff --git a/tests/depend4.test b/tests/depend4.test
new file mode 100755 (executable)
index 0000000..da56d6b
--- /dev/null
@@ -0,0 +1,25 @@
+#! /bin/sh
+
+# check that 'DEP_FILES' is defined when there are many header files
+
+. $srcdir/defs || exit 1
+
+echo AC_PROG_CC >> configure.in
+
+$ACLOCAL || exit 1
+
+headers=
+for header in one.h two.h three.h four.h five.h six.h
+do
+    headers="$headers $header"
+    cat > Makefile.am << END
+bin_PROGRAMS = fred
+fred_SOURCES = fred1.c $headers
+END
+
+    $AUTOMAKE || exit 1
+
+    egrep '^(@[^@]+@)*DEP_FILES = ' Makefile.in || exit 1
+done
+
+exit 0