diff options
author | Michael Olbrich <m.olbrich@pengutronix.de> | 2016-05-26 12:39:18 +0200 |
---|---|---|
committer | Michael Olbrich <m.olbrich@pengutronix.de> | 2016-05-26 12:39:21 +0200 |
commit | ca8040d47f2add5971085c3d06b4b12f7da757e9 (patch) | |
tree | a090a8215d02fef5768a2dc68c980f17d7421411 /scripts | |
parent | 434722d90b20555c487d927f0b0cf48997c9995d (diff) | |
download | ptxdist-ca8040d47f2add5971085c3d06b4b12f7da757e9.tar.gz ptxdist-ca8040d47f2add5971085c3d06b4b12f7da757e9.tar.xz |
ptxdist: add --output-sync option
Calling make with --output-sync=... can have unexpected effects. So don't
enable it by default for parallel building. Instead this adds an option for
this and enables it by default for quiet builds.
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/lib/ptxd_make_serialize.sh | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/scripts/lib/ptxd_make_serialize.sh b/scripts/lib/ptxd_make_serialize.sh index 44e577c14..ba3f1e168 100644 --- a/scripts/lib/ptxd_make_serialize.sh +++ b/scripts/lib/ptxd_make_serialize.sh @@ -47,21 +47,20 @@ export -f ptxd_make_serialize_setup ptxd_make_serialize_init() { local num="${PTXDIST_PARALLELMFLAGS#-j}" - local sync - - if make -h | grep -q -- --output-sync && [ -n "${PTXDIST_FD_STDOUT}" ]; then - sync="--output-sync=" - fi + local sync mflags if [ -n "${num}" ]; then ptxd_make_serialize_setup global "${num}" || return - local mflags="${sync:+${sync}recurse} -j --jobserver-fds=${ptxd_make_serialize_global_readfd},${ptxd_make_serialize_global_writefd}" + sync="${PTXDIST_OUTPUT_SYNC:+${PTXDIST_OUTPUT_SYNC}recurse}" + mflags="${sync} -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}" ;; + *) + sync="${PTXDIST_OUTPUT_SYNC:+${PTXDIST_OUTPUT_SYNC}target --no-print-directory}" + PTXDIST_PARALLELMFLAGS_INTERN="${PTXDIST_PARALLELMFLAGS_INTERN} ${sync}" ;; esac fi |