X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=distrib%2FMacOS%2FMakefile;h=5287292fc010a3cf0926dbad10d376d620879a36;hp=312fbd76a87d3bc353dd39933d8c311a2eaa01e4;hb=63c2dd1dfa6e8ab87e5c2ebf47d43edfb9805c68;hpb=f0ffb7da8edb184558ab6fb5e0a9899f89572333 diff --git a/distrib/MacOS/Makefile b/distrib/MacOS/Makefile index 312fbd7..5287292 100644 --- a/distrib/MacOS/Makefile +++ b/distrib/MacOS/Makefile @@ -40,7 +40,7 @@ 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. +# By default, we pass whatever was used when 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. @@ -52,6 +52,13 @@ ifneq "$(MACOSX_DEPLOYMENT_TARGET)" "" XCODE_EXTRA_CONFIGURE_ARGS += --with-macosx-deployment-target=$(MACOSX_DEPLOYMENT_TARGET) endif +# Determine whether we need to pass a "-target" option to packagemaker +# +# If a deployment target has been set, we use the same target for packagemaker. +ifneq "$(MACOSX_DEPLOYMENT_TARGET)" "" +PACKAGEMAKER_TARGET = -target $(MACOSX_DEPLOYMENT_TARGET) +endif + # Xcode's installation build product location (this is where the GHC.framework # is assembled) DSTROOT=/tmp/GHC.dst @@ -81,7 +88,8 @@ framework-pkg: FRAMEWORK_VERSION=$(FRAMEWORK_VERSION)\ CURRENT_LIBRARY_VERSION=$(FRAMEWORK_VERSION) -$(RM) -f GHC-system.pmdoc/*-contents.xml - $(PACKAGEMAKER) -v --doc GHC-system.pmdoc -o $(TOP)/$(PACKAGE_NAME) + $(PACKAGEMAKER) -v --doc GHC-system.pmdoc\ + $(PACKAGEMAKER_TARGET) -o $(TOP)/$(PACKAGE_NAME) # Instead of making 'binary-dist' a Makefile dependency, we let xcodebuild call # 'make binary-dist'. This has the advantage that xcode knows the framework