]> sourceware.org Git - automake.git/commitdiff
* depcomp (ddashmd): Removed case.
authorTom Tromey <tromey@redhat.com>
Sun, 4 Feb 2001 23:31:46 +0000 (23:31 +0000)
committerTom Tromey <tromey@redhat.com>
Sun, 4 Feb 2001 23:31:46 +0000 (23:31 +0000)
(sgi): Handle failure exit correctly
(aix): Likewise.  Also, add dummy `.h' targets.

ChangeLog
depcomp
lib/depcomp

index 51eb60832609b89929ec3b8679cb4eed3c9bd52f..6090fabad3052a08caa59cda61ae954f74227b57 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2001-02-04  Tom Tromey  <tromey@redhat.com>
+
+       * depcomp (ddashmd): Removed case.
+       (sgi): Handle failure exit correctly
+       (aix): Likewise.  Also, add dummy `.h' targets.
+
 2001-02-04  Akim Demaille  <akim@epita.fr>
 
        * distdir.am (distdir): New file, extracted from...
diff --git a/depcomp b/depcomp
index b0f2e97db90d62a61fbf54e64f5c17b9f556d20f..831e417d03be94e1bfc3bc5ca6b00190124d1d67 100755 (executable)
--- a/depcomp
+++ b/depcomp
@@ -105,20 +105,6 @@ hp)
   exit 1
   ;;
 
-dashmd)
-  # The Java front end to gcc doesn't run cpp, so we can't use the -Wp
-  # trick.  Instead we must use -M and then rename the resulting .d
-  # file.  This is also the case for older versions of gcc, which
-  # don't implement -Wp.
-  if "$@" -MD; then :
-  else
-    stat=$?
-    rm -f FIXME
-    exit $stat
-  fi
-  FIXME: rewrite the file
-  ;;
-
 sgi)
   if test "$libtool" = yes; then
     "$@" "-Wp,-MDupdate,$tmpdepfile"
@@ -128,7 +114,6 @@ sgi)
   stat=$?
   if test $stat -eq 0; then :
   else
-    stat=$?
     rm -f "$tmpdepfile"
     exit $stat
   fi
@@ -168,9 +153,37 @@ aix)
   else
     "$@" -M
   fi
-  if test $? -eq 0 && test -f "$tmpdepfile"; then
-    mv "$tmpdepfile" "$depfile"
+
+  stat=$?
+  if test $stat -eq 0; then :
+  else
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+
+  if test -f "$tmpdepfile"; then
+    echo "$object : \\" > "$depfile"
+
+    # Clip off the initial element (the dependent). Don't try to be
+    # clever and replace this with sed code, as IRIX sed won't handle
+    # lines with more than a fixed number of characters (4096 in
+    # IRIX 6.2 sed, 8192 in IRIX 6.5).
+    tr ' ' '
+' < "$tmpdepfile" | sed 's/^[^\.]*\.o://' | tr '
+' ' ' >> $depfile
+
+    tr ' ' '
+' < "$tmpdepfile" | \
+## Some versions of the HPUX 10.20 sed can't process this invocation
+## correctly.  Breaking it into two sed invocations is a workaround.
+      sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+  else
+    # The sourcefile does not contain any dependencies, so just
+    # store a dummy comment line, to avoid errors with the Makefile
+    # "include basename.Plo" scheme.
+    echo "#dummy" > "$depfile"
   fi
+  rm -f "$tmpdepfile"
   ;;
 
 #nosideeffect)
index b0f2e97db90d62a61fbf54e64f5c17b9f556d20f..831e417d03be94e1bfc3bc5ca6b00190124d1d67 100755 (executable)
@@ -105,20 +105,6 @@ hp)
   exit 1
   ;;
 
-dashmd)
-  # The Java front end to gcc doesn't run cpp, so we can't use the -Wp
-  # trick.  Instead we must use -M and then rename the resulting .d
-  # file.  This is also the case for older versions of gcc, which
-  # don't implement -Wp.
-  if "$@" -MD; then :
-  else
-    stat=$?
-    rm -f FIXME
-    exit $stat
-  fi
-  FIXME: rewrite the file
-  ;;
-
 sgi)
   if test "$libtool" = yes; then
     "$@" "-Wp,-MDupdate,$tmpdepfile"
@@ -128,7 +114,6 @@ sgi)
   stat=$?
   if test $stat -eq 0; then :
   else
-    stat=$?
     rm -f "$tmpdepfile"
     exit $stat
   fi
@@ -168,9 +153,37 @@ aix)
   else
     "$@" -M
   fi
-  if test $? -eq 0 && test -f "$tmpdepfile"; then
-    mv "$tmpdepfile" "$depfile"
+
+  stat=$?
+  if test $stat -eq 0; then :
+  else
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+
+  if test -f "$tmpdepfile"; then
+    echo "$object : \\" > "$depfile"
+
+    # Clip off the initial element (the dependent). Don't try to be
+    # clever and replace this with sed code, as IRIX sed won't handle
+    # lines with more than a fixed number of characters (4096 in
+    # IRIX 6.2 sed, 8192 in IRIX 6.5).
+    tr ' ' '
+' < "$tmpdepfile" | sed 's/^[^\.]*\.o://' | tr '
+' ' ' >> $depfile
+
+    tr ' ' '
+' < "$tmpdepfile" | \
+## Some versions of the HPUX 10.20 sed can't process this invocation
+## correctly.  Breaking it into two sed invocations is a workaround.
+      sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+  else
+    # The sourcefile does not contain any dependencies, so just
+    # store a dummy comment line, to avoid errors with the Makefile
+    # "include basename.Plo" scheme.
+    echo "#dummy" > "$depfile"
   fi
+  rm -f "$tmpdepfile"
   ;;
 
 #nosideeffect)
This page took 0.035431 seconds and 5 git commands to generate.