]> sourceware.org Git - automake.git/commitdiff
* m4/depend.m4 (AM_DEPENDENCIES): If depcomp doesn't exist, revert
authorTom Tromey <tromey@redhat.com>
Fri, 18 May 2001 00:00:31 +0000 (00:00 +0000)
committerTom Tromey <tromey@redhat.com>
Fri, 18 May 2001 00:00:31 +0000 (00:00 +0000)
to no dependency tracking.
* tests/Makefile.am (TESTS): Added depcomp2.test.
* tests/depcomp2.test: New file.  From Pavel Roskin.

ChangeLog
m4/depend.m4
tests/Makefile.am
tests/Makefile.in
tests/depcomp2.test [new file with mode: 0755]

index 4e2bde653a53f2f2f4bbf500f5d17cf6e5c174d1..fd40dbe16de56133926c575a91b95d1fa30ec75f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2001-05-17  Tom Tromey  <tromey@redhat.com>
 
+       * m4/depend.m4 (AM_DEPENDENCIES): If depcomp doesn't exist, revert
+       to no dependency tracking.
+       * tests/Makefile.am (TESTS): Added depcomp2.test.
+       * tests/depcomp2.test: New file.  From Pavel Roskin.
+
        * lib/depcomp (aix): Bug fix and simplification from Larry Jones.
 
        * lib/depcomp (tru64): New dependency tracking mode.
index e37b3ead73db9fc16d99b55b5dd683cc1bb94262..11f7cdc5b04364379159a42e8dca6c4726806276 100644 (file)
@@ -39,7 +39,7 @@ AC_REQUIRE([AM_DEP_TRACK])
 
 AC_CACHE_CHECK([dependency style of $depcc],
                [am_cv_$1_dependencies_compiler_type],
-[if test -z "$AMDEP_TRUE"; then
+[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
   # We make a subdir and do the tests there.  Otherwise we can end up
   # making bogus files that we don't know about and never remove.  For
   # instance it was reported that on HP-UX the gcc test will end up
index b85c670a3d55484771cd4fe11d173f37e05fafbf..3884546f0ff3c3b97b42ec21f54e5b38ddc9adc6 100644 (file)
@@ -94,6 +94,7 @@ dejagnu.test \
 depacl.test \
 depacl2.test \
 depcomp.test \
+depcomp2.test \
 depend.test \
 depend2.test \
 depend3.test \
index 53d1a398c1192885c8de6aa458592324e7e510a1..9c1a1e85d2491aaf32f6a0b40362988b50c3fbe1 100644 (file)
@@ -162,6 +162,7 @@ dejagnu.test \
 depacl.test \
 depacl2.test \
 depcomp.test \
+depcomp2.test \
 depend.test \
 depend2.test \
 depend3.test \
diff --git a/tests/depcomp2.test b/tests/depcomp2.test
new file mode 100755 (executable)
index 0000000..54e4bda
--- /dev/null
@@ -0,0 +1,41 @@
+#! /bin/sh
+
+# Test to make sure that depcomp is not used when it's not installed
+# From Pavel Roskin.
+
+. $srcdir/defs || exit 1
+
+cat > configure.in << 'END'
+AC_INIT(subdir/foo.c)
+AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+PACKAGE=nonesuch
+VERSION=nonesuch
+AC_PROG_CC
+AC_OUTPUT(Makefile subdir/Makefile)
+END
+
+cat > Makefile.am << 'END'
+SUBDIRS = subdir
+END
+
+rm -f depcomp
+mkdir subdir
+
+cat > subdir/Makefile.in << 'END'
+foo:
+       $(CC) -o foo foo.c
+END
+
+: > subdir/foo.c
+
+# Fail gracefully if no autoconf.
+$needs_autoconf
+
+# Likewise for gcc.
+(gcc -v) > /dev/null 2>&1 || exit 77
+
+$ACLOCAL || exit 1
+$AUTOMAKE --add-missing || exit 1
+$AUTOCONF || exit 1
+CC='gcc' ./configure 2>error.log
+test -z "`cat error.log`"
This page took 0.035165 seconds and 5 git commands to generate.