X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=distrib%2FMacOS%2FMakefile;h=f1031849654b32f3f96656cb6b6cf782deeb1599;hb=577c8a60130bb14bc8bcf5735cf506ddcfdc0e2a;hp=7f4698a719c3cbb8d6138102eea0e243c96f2393;hpb=160cec311bcb566640023124a97ca1d5a1b61a0d;p=ghc-hetmet.git diff --git a/distrib/MacOS/Makefile b/distrib/MacOS/Makefile index 7f4698a..f103184 100644 --- a/distrib/MacOS/Makefile +++ b/distrib/MacOS/Makefile @@ -7,7 +7,11 @@ # framework-pkg [MacOS only] # Builds /Library/Frameworks/GHC.framework wrapped into a Mac # installer package; must be executed in a ./configure'd tree -# (--prefix doesn't matter as it will be overridden) +# (--prefix doesn't matter as it will be overridden); other +# ./configure arguments are passed through, unless overwritten +# with XCODE_EXTRA_CONFIGURE_ARGS. A deployment target can +# be specified by setting the corresponding ./configure +# argument or by setting MACOSX_DEPLOYMENT_TARGET. # # framework-binary-dist [MacOS only] # Builds GHC.framework encapsulating a binary distribution @@ -34,6 +38,20 @@ SHORT_VERSION_STRING = $(ProjectVersion) # Name of the installer package PACKAGE_NAME = GHC-$(ProjectVersion)-$(TargetArch_CPP).pkg +# Determine arguments that should be passed to ./configure from within Xcode +# +# By default, we pass whatever was used whne the present tree was configured. +# The user can override this by setting XCODE_EXTRA_CONFIGURE_ARGS. If +# MACOSX_DEPLOYMENT_TARGET is set, the target is added to whatever arguments +# are passed. +export XCODE_EXTRA_CONFIGURE_ARGS +ifeq "$(XCODE_EXTRA_CONFIGURE_ARGS)" "" +XCODE_EXTRA_CONFIGURE_ARGS = $(shell echo $(CONFIGURE_ARGS)) +endif +ifneq "$(MACOSX_DEPLOYMENT_TARGET)" "" +XCODE_EXTRA_CONFIGURE_ARGS += --with-macosx-deployment-target=$(MACOSX_DEPLOYMENT_TARGET) +endif + # Xcode's installation build product location (this is where the GHC.framework # is assembled) DSTROOT=/tmp/GHC.dst @@ -57,7 +75,7 @@ framework-pkg: -$(RM) -rf $(DSTROOT) mkdir -p $(TOOLS_SYSTEM) cp installer-scripts/Uninstaller $(TOOLS_SYSTEM) - xcodebuild -target GHC-systemwide clean install\ + xcodebuild -target GHC-systemwide clean build install\ CURRENT_PROJECT_VERSION=$(CURRENT_PROJECT_VERSION)\ SHORT_VERSION_STRING=$(SHORT_VERSION_STRING)\ FRAMEWORK_VERSION=$(FRAMEWORK_VERSION)\