I've been using Paul D. Smith's dependency approach detailed in his article
Advanced Auto-Dependency Generation (
http://make.paulandlesley.org/autodep.html ) for a while now.  However, I'm
wondering if the use of sed in creating the dependency files could create
potential problems under parallel builds (-j).

 

>From "5.4 Parallel Execution" of the GNU Make Manual:

 

"Another problem is that two processes cannot both take input from the same
device; so to make sure that only one command tries to take input from the
terminal at once, make will invalidate the standard input streams of all but
one running command. This means that attempting to read from standard input
will usually be a fatal error (a `Broken pipe' signal) for most child
processes if there are several. It is unpredictable which command will have
a valid standard input stream (which will come from the terminal, or
wherever you redirect the standard input of make). The first command run
will always get it first, and the first command started after that one
finishes will get it next, and so on."

 

Since sed is reading from STDIN to generate the dependency problem, doesn't
it violate the rule above?  I was thinking another alternative would be to
implement similar functionality through a script that opens a file handle on
the dependency file to perform the transformation.  Thoughts?

 

Thanks,

Josh

_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make

Reply via email to