Skip to content

Commit

Permalink
[Makefile]: Add conditional to not build the macos gui if it's not th…
Browse files Browse the repository at this point in the history
…e xcode version of xcodebuild
  • Loading branch information
EruEri committed Jun 9, 2024
1 parent 35a7fe8 commit 507ebd0
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/Makefile.OCaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ OCAMLLIBDIR:=$(shell $(OCAMLC) -config-var standard_library)
#
OCAMLFIND := $(shell command -v ocamlfind 2> /dev/null)

# Any invocation of the non-Xcode version of xcodebuild will trigger an error message
# and an non 0 exit code.
XCODEBUILD := $(shell xcodebuild -version > /dev/null; echo $$?)

ifdef OCAMLFIND
ifneq ($(strip $(shell $(OCAMLFIND) query lablgtk3 2> /dev/null)),)
HAS_LABLGTK3=true
Expand All @@ -72,7 +76,12 @@ endif

.PHONY: macuimaybe
ifeq ($(OSARCH), Darwin)
macuimaybe: macui
ifeq ($(XCODEBUILD), 0)
macuimaybe: macui
else
macuimaybe:
$(info Not the xcode version of xcodebuild, macOS native GUI can not be build.)
endif
else
macuimaybe:
$(info Not on macOS. macOS native GUI will not be built.)
Expand Down

0 comments on commit 507ebd0

Please sign in to comment.