qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [RFC PATCH] Makefile: Enable synchronized parallel outp


From: Peter Maydell
Subject: Re: [Qemu-devel] [RFC PATCH] Makefile: Enable synchronized parallel output when possible
Date: Mon, 25 Jun 2018 17:33:42 +0100

On 22 June 2018 at 03:20, Philippe Mathieu-Daudé <address@hidden> wrote:
> The '--output-sync' option is available since GNU make 4.0.

> Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
> ---
> Maybe 'line' is better for workstation and 'target/recurse' for
> unattended builds.
>
> doc: https://www.gnu.org/software/make/manual/html_node/Parallel-Output.html
> ---
>  Makefile | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/Makefile b/Makefile
> index e46f2b625a..e94c687afe 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -367,6 +367,10 @@ DOCS=
>  endif
>
>  SUBDIR_MAKEFLAGS=$(if $(V),,--no-print-directory --quiet) 
> BUILD_DIR=$(BUILD_DIR)
> +ifeq ($(shell test $(firstword $(subst ., ,$(MAKE_VERSION))) -ge 4; echo 
> $$?),0)

A comment here would help in figuring out what version check
you were intending to perform. Also surely we don't need to
go out to the shell just to do a comparison...

Make seems to advertise --output-sync support as part of its
.FEATURES variable, so probably the most reliable way to do
this test is to check whether .FEATURES contains "output-sync".

> +SUBDIR_MAKEFLAGS+=--output-sync=target
> +endif
> +
>  SUBDIR_DEVICES_MAK=$(patsubst %, %/config-devices.mak, $(TARGET_LIST))
>  SUBDIR_DEVICES_MAK_DEP=$(patsubst %, %-config-devices.mak.d, $(TARGET_LIST))

This only affects our sub-makes, though, right? So the user
would have to specify it on the command line anyway so that
it applies to the top level make process...

thanks
-- PMM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]