[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 3/4] configure: Prefer gmake on darwin
From: |
Roman Bolshakov |
Subject: |
[PATCH 3/4] configure: Prefer gmake on darwin |
Date: |
Sun, 23 Aug 2020 00:21:28 +0300 |
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
;;
SunOS)
solaris="yes"
--
2.28.0
- Re: [PATCH 1/4] configure: Use discovered make for in-source build, (continued)
Re: [PATCH 1/4] configure: Use discovered make for in-source build, Eric Blake, 2020/08/24
[PATCH 4/4] configure: Test if $make actually exists, Roman Bolshakov, 2020/08/22
[PATCH 2/4] Makefile: Require GNU make 3.82+, Roman Bolshakov, 2020/08/22
[PATCH 3/4] configure: Prefer gmake on darwin,
Roman Bolshakov <=