From 94c5695d6f1933aa8bffe50180dde702f1485297 Mon Sep 17 00:00:00 2001 From: Michael Cho Date: Fri, 22 Nov 2024 15:33:10 -0500 Subject: [PATCH] Makefile: fix defines on ARM macOS Due to Darwin-arm64 conditional setting of `CPPFLAGS`, the subsequent `CPPFLAGS +=` is resolved earlier on ARM macOS which results in empty paths being used. Changelog-None --- Makefile | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/Makefile b/Makefile index 82174c25e..14bd27456 100644 --- a/Makefile +++ b/Makefile @@ -232,6 +232,20 @@ ALL_C_HEADERS := # Extra (non C) targets that should be built by default. DEFAULT_TARGETS := +# Installation directories +exec_prefix = $(PREFIX) +bindir = $(exec_prefix)/bin +libexecdir = $(exec_prefix)/libexec +pkglibexecdir = $(libexecdir)/$(PKGNAME) +plugindir = $(pkglibexecdir)/plugins +datadir = $(PREFIX)/share +docdir = $(datadir)/doc/$(PKGNAME) +mandir = $(datadir)/man +man1dir = $(mandir)/man1 +man5dir = $(mandir)/man5 +man7dir = $(mandir)/man7 +man8dir = $(mandir)/man8 + # M1 macos machines with homebrew will install the native libraries in # /opt/homebrew instead of /usr/local, most likely because they # emulate x86_64 compatibility via Rosetta, and wanting to keep the @@ -758,20 +772,6 @@ update-mocks/%: % $(ALL_GEN_HEADERS) $(ALL_GEN_SOURCES) unittest/%: % bolt-precheck BOLTDIR=$(LOCAL_BOLTDIR) $(VG) $(VG_TEST_ARGS) $* > /dev/null -# Installation directories -exec_prefix = $(PREFIX) -bindir = $(exec_prefix)/bin -libexecdir = $(exec_prefix)/libexec -pkglibexecdir = $(libexecdir)/$(PKGNAME) -plugindir = $(pkglibexecdir)/plugins -datadir = $(PREFIX)/share -docdir = $(datadir)/doc/$(PKGNAME) -mandir = $(datadir)/man -man1dir = $(mandir)/man1 -man5dir = $(mandir)/man5 -man7dir = $(mandir)/man7 -man8dir = $(mandir)/man8 - # Commands MKDIR_P = mkdir -p INSTALL = install