From f15e8395dc5c4c4058a54370795ef79c95a70e04 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Sun, 4 Feb 2001 23:31:46 +0000 Subject: [PATCH] * depcomp (ddashmd): Removed case. (sgi): Handle failure exit correctly (aix): Likewise. Also, add dummy `.h' targets. --- ChangeLog | 6 ++++++ depcomp | 47 ++++++++++++++++++++++++++++++----------------- lib/depcomp | 47 ++++++++++++++++++++++++++++++----------------- 3 files changed, 66 insertions(+), 34 deletions(-) diff --git a/ChangeLog b/ChangeLog index 51eb6083..6090faba 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2001-02-04 Tom Tromey + + * depcomp (ddashmd): Removed case. + (sgi): Handle failure exit correctly + (aix): Likewise. Also, add dummy `.h' targets. + 2001-02-04 Akim Demaille * distdir.am (distdir): New file, extracted from... diff --git a/depcomp b/depcomp index b0f2e97d..831e417d 100755 --- 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) diff --git a/lib/depcomp b/lib/depcomp index b0f2e97d..831e417d 100755 --- a/lib/depcomp +++ b/lib/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) -- 2.43.5