Index: ChangeLog =================================================================== RCS file: /cvs/automake/automake/ChangeLog,v retrieving revision 1.872 diff -u -r1.872 ChangeLog --- ChangeLog 2000/06/02 23:27:02 1.872 +++ ChangeLog 2000/06/04 17:27:09 @@ -1,3 +1,9 @@ +2000-06-04 Morten Eriksen + + * depcomp: fixed bug in sgi dependency tracking mode with + sourcecode files which does not contain any dependencies to other + source files. + 2000-06-02 Morten Eriksen * depcomp: workaround for problem with SGI IRIX sed (it can only Index: depcomp =================================================================== RCS file: /cvs/automake/automake/depcomp,v retrieving revision 1.7 diff -u -r1.7 depcomp --- depcomp 2000/06/02 23:27:02 1.7 +++ depcomp 2000/06/04 17:27:23 @@ -122,20 +122,29 @@ 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" ;;