From: Akim Demaille Date: Mon, 16 Oct 2000 19:21:04 +0000 (+0000) Subject: * depcomp: Fix a bug in SGI dependency tracking mode with source X-Git-Tag: Release-1-4b~40 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b2904b1ae02ba850666c1ce74807762a3a828914;p=thirdparty%2Fautomake.git * depcomp: Fix a bug in SGI dependency tracking mode with source files which do not contain any dependencies to other source files. --- diff --git a/ChangeLog b/ChangeLog index 233b76cf9..91f163c2e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2000-10-16 Morten Eriksen + + * depcomp: Fix a bug in SGI dependency tracking mode with source + files which do not contain any dependencies to other source files. + 2000-10-16 Rodney Brown * aclocal.in, aclocal.m4: Standardize FSF Copyright statements. diff --git a/depcomp b/depcomp index e482a0daf..b1a74e190 100755 --- a/depcomp +++ b/depcomp @@ -125,20 +125,29 @@ sgi) exit $stat fi rm -f "$depfile" - echo "$object : \\" > "$depfile" - # Clip off the initial element (the dependent). Don't try to be - # clever and remove the tr invocations, as IRIX sed won't handle - # lines with more than 8192 characters. - tr ' ' ' + if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files + 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 ' ' ' + 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" + 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" ;; diff --git a/lib/depcomp b/lib/depcomp index e482a0daf..b1a74e190 100755 --- a/lib/depcomp +++ b/lib/depcomp @@ -125,20 +125,29 @@ sgi) exit $stat fi rm -f "$depfile" - echo "$object : \\" > "$depfile" - # Clip off the initial element (the dependent). Don't try to be - # clever and remove the tr invocations, as IRIX sed won't handle - # lines with more than 8192 characters. - tr ' ' ' + if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files + 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 ' ' ' + 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" + 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" ;;