Hi,

I discovered an unpleasant problem in the depcomp "sgi" dependency
generation code: the first line of the .Plo file will get truncated on
IRIX systems with SGI sed where the line is > 8192 characters (i.e. a
sourcefile with a large set of dependencies).

This can (and more often than not _will_) lead to a mangled filename
at the end of the line, which again will invalidate the makefile
(because the .Plo file is included there).

At first, I thought this was due to a MIPSpro compiler bug, but I
discovered that it was in fact due to the native sed. Checking the man
pages for sed (SGI IRIX 6.5), I find this:

     Some of the commands use a hold space to save all or part of the
     pattern space for subsequent retrieval.  The hold and pattern
     spaces each hold at least 8192 bytes.


The offending line in depcomp which hits this limit is line #126:

  sed 's/^[^:]*: / /' < "$tmpdepfile" >> "$depfile"


Any ideas on how to rewrite this line as to avoid the 8192 character
limit of IRIX sed? I guess this is not the first time a workaround for
a problem like this has to be made in Automake or Autoconf.

Regards,
Morten

Reply via email to