X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=distrib%2FMacOS%2FMakefile;h=3d7852e7d43ae5030a780e1a3bd91a44819b45d5;hb=7bb3d1fc79521d591cd9f824893963141a7997b6;hp=35118f3970688f54578ba781044f0ebc75cd2e45;hpb=5db43861247cb96adb8d138bfd8e408180c348f1;p=ghc-hetmet.git diff --git a/distrib/MacOS/Makefile b/distrib/MacOS/Makefile index 35118f3..3d7852e 100644 --- a/distrib/MacOS/Makefile +++ b/distrib/MacOS/Makefile @@ -20,8 +20,13 @@ # ############################################################################ -TOP=../.. -include $(TOP)/mk/boilerplate.mk +include ../../mk/config.mk + +ifeq "$(ProjectVersion)" "" +$(error Please run ./configure first) +endif + +include ../../mk/custom-settings.mk # The ProjectVersionInt is GHC's idea of an API version and hence determines # the framework version. @@ -86,16 +91,24 @@ framework-pkg: CURRENT_PROJECT_VERSION=$(CURRENT_PROJECT_VERSION)\ SHORT_VERSION_STRING=$(SHORT_VERSION_STRING)\ FRAMEWORK_VERSION=$(FRAMEWORK_VERSION)\ - CURRENT_LIBRARY_VERSION=$(FRAMEWORK_VERSION) + CURRENT_LIBRARY_VERSION=$(FRAMEWORK_VERSION)\ + COMMAND_MODE=unix2003 xcodebuild -target GHC-systemwide install\ CURRENT_PROJECT_VERSION=$(CURRENT_PROJECT_VERSION)\ SHORT_VERSION_STRING=$(SHORT_VERSION_STRING)\ FRAMEWORK_VERSION=$(FRAMEWORK_VERSION)\ - CURRENT_LIBRARY_VERSION=$(FRAMEWORK_VERSION) + CURRENT_LIBRARY_VERSION=$(FRAMEWORK_VERSION)\ + COMMAND_MODE=unix2003 -$(RM) -f GHC-system.pmdoc/*-contents.xml $(PACKAGEMAKER) -v --doc GHC-system.pmdoc\ $(PACKAGEMAKER_TARGET) -o $(TOP)/$(PACKAGE_NAME) +# If we don't specify COMMAND_MODE=unix2003 then xcodebuild defaults +# to setting it to legacy, which means that ar builds archives +# without a table of contents. That makes the build fail later on. + + + # Instead of making 'binary-dist' a Makefile dependency, we let xcodebuild call # 'make binary-dist'. This has the advantage that xcode knows the framework # path into which the distribution should be installed and can instruct