From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Roman Bolshakov <r.bolshakov@yadro.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [PATCH 3/4] configure: Prefer gmake on darwin
Date: Mon, 24 Aug 2020 15:48:27 +0100 [thread overview]
Message-ID: <20200824144827.GO10011@redhat.com> (raw)
In-Reply-To: <20200822212129.97758-4-r.bolshakov@yadro.com>
On Sun, Aug 23, 2020 at 12:21:28AM +0300, Roman Bolshakov wrote:
> New meson/make build requires GNU make 3.82+ but macOS ships 3.81 even
> on Big Sur while homebrew provides GNU make 4.3 as 'gmake' in $PATH.
>
> With the change, 'make' switches over to gmake implicitly.
>
> Signed-off-by: Roman Bolshakov <r.bolshakov@yadro.com>
> ---
> configure | 22 ++++++++++++++++++++++
> 1 file changed, 22 insertions(+)
>
> diff --git a/configure b/configure
> index 9e0d505067..90b02b7271 100755
> --- a/configure
> +++ b/configure
> @@ -903,6 +903,7 @@ Darwin)
> darwin="yes"
> hax="yes"
> hvf="yes"
> + make="${MAKE-gmake}"
> LDFLAGS_SHARED="-bundle -undefined dynamic_lookup"
> if [ "$cpu" = "x86_64" ] ; then
> QEMU_CFLAGS="-arch x86_64 $QEMU_CFLAGS"
> @@ -916,6 +917,27 @@ Darwin)
> # won't work when we're compiling with gcc as a C compiler.
> QEMU_CFLAGS="-DOS_OBJECT_USE_OBJC=0 $QEMU_CFLAGS"
> HOST_VARIANT_DIR="darwin"
> + cat > GNUmakefile <<'EOF'
> +# This file is auto-generated by configure to implicitly switch from a 'make'
> +# invocation to 'gmake'
> +
> +OLD_MAKE := $(MAKE)
> +
> +include config-host.mak
> +
> +ifeq ($(MAKECMDGOALS),)
> +recurse: all
> +endif
> +
> +.NOTPARALLEL: %
> +%: force
> + @echo 'Switch from $(OLD_MAKE) to $(MAKE)'
> + @$(MAKE) -f Makefile $(MAKECMDGOALS)
> +force: ;
> +.PHONY: force
> +GNUmakefile: ;
> +
> +EOF
I was wondering why you duplicated the GNUmakefile I created earlier, then
I realized this one is created in the build dir, whereas the other was
created in the source dir. I would note this works for macOS which has a
GNU make, but doesn't work for FreeBSD has non-GNU make by default.
I kind of feel like the previous patch which raises an error is good
enough. User can just put the homebrew newer GNU make first in their
$PATH, which is sensible regardless IMHO.
None the less, this patch does what it claims so
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
next prev parent reply other threads:[~2020-08-24 14:49 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-22 21:21 [PATCH 0/4] Compatibility make fixes for meson Roman Bolshakov
2020-08-22 21:21 ` [PATCH 1/4] configure: Use discovered make for in-source build Roman Bolshakov
2020-08-24 14:31 ` Daniel P. Berrangé
2020-08-24 14:37 ` Eric Blake
2020-08-24 22:07 ` Roman Bolshakov
2020-08-25 10:16 ` Roman Bolshakov
2020-08-25 14:06 ` Eric Blake
2020-08-24 14:43 ` Eric Blake
2020-08-22 21:21 ` [PATCH 2/4] Makefile: Require GNU make 3.82+ Roman Bolshakov
2020-08-24 14:32 ` Daniel P. Berrangé
2020-08-22 21:21 ` [PATCH 3/4] configure: Prefer gmake on darwin Roman Bolshakov
2020-08-24 14:48 ` Daniel P. Berrangé [this message]
2020-08-24 14:49 ` Eric Blake
2020-08-24 14:51 ` Daniel P. Berrangé
2020-08-24 14:56 ` Eric Blake
2020-08-24 15:57 ` Peter Maydell
2020-08-25 9:25 ` Roman Bolshakov
2020-08-22 21:21 ` [PATCH 4/4] configure: Test if $make actually exists Roman Bolshakov
2020-08-24 14:49 ` Daniel P. Berrangé
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200824144827.GO10011@redhat.com \
--to=berrange@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=r.bolshakov@yadro.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).