diff options
author | Michael Olbrich <m.olbrich@pengutronix.de> | 2016-05-17 09:55:06 +0200 |
---|---|---|
committer | Michael Olbrich <m.olbrich@pengutronix.de> | 2016-05-17 09:55:31 +0200 |
commit | c5bc6b39977246f0e52101edd04f451aba9ac364 (patch) | |
tree | dc311f933f9d608320f388ee57ace23c67cee18b /scripts/lib | |
parent | 03e7a91710e5c81dce70c4b26e14b8b3c347776d (diff) | |
download | ptxdist-c5bc6b39977246f0e52101edd04f451aba9ac364.tar.gz ptxdist-c5bc6b39977246f0e52101edd04f451aba9ac364.tar.xz |
ptxdist: improve output ordering for parallel building
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Diffstat (limited to 'scripts/lib')
-rw-r--r-- | scripts/lib/ptxd_make_serialize.sh | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/scripts/lib/ptxd_make_serialize.sh b/scripts/lib/ptxd_make_serialize.sh index ba8fb8bea..a9586df48 100644 --- a/scripts/lib/ptxd_make_serialize.sh +++ b/scripts/lib/ptxd_make_serialize.sh @@ -47,12 +47,22 @@ export -f ptxd_make_serialize_setup ptxd_make_serialize_init() { local num="${PTXDIST_PARALLELMFLAGS#-j}" + local sync + + if make -h | grep -q -- --output-sync; then + sync="--output-sync=" + fi if [ -n "${num}" ]; then ptxd_make_serialize_setup global "${num}" || return - local mflags="-j --jobserver-fds=${ptxd_make_serialize_global_readfd},${ptxd_make_serialize_global_writefd}" + local mflags="${sync:+${sync}recurse} -j --jobserver-fds=${ptxd_make_serialize_global_readfd},${ptxd_make_serialize_global_writefd}" PTXDIST_PARALLELMFLAGS_INTERN="${mflags}" PTXDIST_PARALLELMFLAGS_EXTERN="${mflags}" + else + case "${PTXDIST_PARALLELMFLAGS_INTERN}" in + -j1) ;; + *) PTXDIST_PARALLELMFLAGS_INTERN="${PTXDIST_PARALLELMFLAGS_INTERN} ${sync:+${sync}target --no-print-directory}" ;; + esac fi ptxd_make_serialize_setup get 4 && |