[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug #22923] option to prevent "interspersed" output in parallel builds
From: |
Erik Cumps |
Subject: |
[bug #22923] option to prevent "interspersed" output in parallel builds |
Date: |
Tue, 27 Oct 2009 14:34:50 +0000 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.6) Gecko/2009011913 Firefox/3.0.6 (.NET CLR 3.5.30729) |
Follow-up Comment #4, bug #22923 (project make):
We have implemented output merging with a shell wrapper script. We ask make
to use this wrapper script via the SHELL variable.
The script itself is pretty simple, although it may be bash-centric:
----------------------------------------
#!/bin/sh
# Simple shell wrapper for stdout and stderr buffering
# Created 2002, Erik Cumps
#
# Use with parallel makes to prevent confusing output.
# Run make SHELL=makesh ... or edit makefile.
#
# This version merges stdout/stderr.
cleanup() {
if [ -f /tmp/makesh-$$ ]; then
cat /tmp/makesh-$$
rm -f /tmp/makesh-$$
fi
if [ "${RC}" = "beach" ]; then
# interrupted before reaping child status or weird error
echo "*** makesh: interrupted by signal before reaping child
status" 1>&2
exit 42
else
exit ${RC}
fi
}
# Run command, redirect stdout/stderr to temp file
# Remember command's exit status
RC="beach"
trap cleanup SIGHUP SIGINT SIGQUIT SIGTERM
/bin/bash -c "$@" 1>/tmp/makesh-$$ 2>&1
RC=$?
cleanup
----------------------------------------
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?22923>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [bug #22923] option to prevent "interspersed" output in parallel builds,
Erik Cumps <=