On Thu, Apr 14, 2011 at 4:30 PM, David Boyce <david.s.bo...@gmail.com> wrote: > I don't know why this hasn't occurred to me or the authors of similar > programs before, but it appears to be possible to get a lock on any > writable file descriptor - for instance stdout or stderr, or one of > the jobserver-fds. I just changed syncsh to synchronize around a lock > on stdout and it seems to work. This looks much more elegant than > specifying a writable file.
Attached is an updated patch with some improvements: - The feature is turned on by a special target currently called .PARALLELSYNC. No filename required. - It uses stdout as its semaphore. - It combines output into one temp file iff the inherited stdout and stderr are already combined, as suggested by Howard Chu. Very lightly tested, of course. See the Makefile.synctest for a usage example. David
make-sync.patch
Description: Binary data
Makefile.synctest
Description: Binary data
_______________________________________________ Bug-make mailing list Bug-make@gnu.org http://lists.gnu.org/mailman/listinfo/bug-make