# -----------------------------------------------------------------------------
# Making a binary distribution
#
-# `dist' `binary-dist'
+# `dist' `binary-dist' `binary-dist-macos'
# Create a distribution tar file for this program. The tar file
# should be set up so that the file names in the tar file start with
# a subdirectory name which is the name of the package it is a
# that are in the distribution, to make sure they are up to date in
# the distribution. See Making Releases.
#
-# binary-dist is a GHC addition for binary distributions
+# binary-dist is a GHC addition for binary distributions and
+# binary-dist-macos is the Mac OS X-specific variant creating an
+# installer package for GHC.framework.
#
binary-dist::
-rm -rf $(BIN_DIST_DIR)
- -$(RM) $(BIN_DIST_DIR).tar.gz
+ -$(RM) $(BIN_DIST_TARBALL)
# When making bindists, we can have problems if some things (e.g. ghc-pkg)
# are compiled with the bootstrapping compiler and some (e.g. the stage 2
BIN_DIST_TOP+=mk/fix_install_names.sh
endif
-.PHONY: binary-dist-pre% binary-dist binary-pack
+.PHONY: binary-dist-pre% binary-dist binary-dist-macos
binary-dist:: binary-dist-pre
.PHONY: tar-binary-dist
tar-binary-dist:
( cd $(BIN_DIST_TOPDIR_ABS); tar cf - $(BIN_DIST_NAME) | bzip2 >$(BIN_DIST_TARBALL) )
- ( cd $(BIN_DIST_TOPDIR_ABS); bunzip2 -c $(BIN_DIST_TARBALL) | tar tf - | sed "s/^ghc-$(ProjectVersion)/fptools/" | sort >bin-manifest-$(ProjectVersion) )
+ ( cd $(BIN_DIST_TOPDIR_ABS); bunzip2 -c $(BIN_DIST_TARBALL) | tar tf - | sed "s/^ghc-$(ProjectVersion)/fptools/" | sort >$(FPTOOLS_TOP_ABS)/bin-manifest-$(ProjectVersion) )
PUBLISH_FILES = $(BIN_DIST_TARBALL)
binary-dist::
@echo "Mechanical and super-natty! Inspect the result and *if* happy; freeze, sell and get some sleep!"
+ifeq "$(darwin_TARGET_OS)" "1"
+
+# Wrap a binary dist as a MacOS framework and put it into an installer package.
+
+# The ProjectVersionInt is GHC's idea of an API version and hence determines
+# the framework version.
+FRAMEWORK_VERSION = $(ProjectVersionInt)
+
+# Xcode requires CURRENT_PROJECT_VERSION to be an int or float. We use this
+# only as the build version (aka CFBundleVersion).
+CURRENT_PROJECT_VERSION = $(ProjectVersionInt).$(ProjectPatchLevel)
+
+# The user-visible CFBundleShortVersionString is set to the standard GHC
+# version number.
+SHORT_VERSION_STRING = $(ProjectVersion)
+
+# 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
+# binary-dist to put it into the right place without copying the whole tree yet
+# another time.
+#
+binary-dist-macos:
+ (cd distrib/MacOS; \
+ xcodebuild CURRENT_PROJECT_VERSION=$(CURRENT_PROJECT_VERSION)\
+ SHORT_VERSION_STRING=$(SHORT_VERSION_STRING)\
+ FRAMEWORK_VERSION=$(FRAMEWORK_VERSION)\
+ CURRENT_LIBRARY_VERSION=$(FRAMEWORK_VERSION))
+ (cd distrib/MacOS; \
+ !!!Call the packager!!! )
+
+endif
+
# -----------------------------------------------------------------------------
# Building source distributions
#
--- /dev/null
+// !$*UTF8*$!
+{
+ archiveVersion = 1;
+ classes = {
+ };
+ objectVersion = 44;
+ objects = {
+
+/* Begin PBXBuildFile section */
+ 8D07F2C00486CC7A007CD1D0 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C1666FE841158C02AAC07 /* InfoPlist.strings */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXFileReference section */
+ 089C1667FE841158C02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = "<group>"; };
+ 8D07F2C70486CC7A007CD1D0 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist; path = Info.plist; sourceTree = "<group>"; };
+ 8D07F2C80486CC7A007CD1D0 /* GHC.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = GHC.framework; sourceTree = BUILT_PRODUCTS_DIR; };
+/* End PBXFileReference section */
+
+/* Begin PBXGroup section */
+ 034768DDFF38A45A11DB9C8B /* Products */ = {
+ isa = PBXGroup;
+ children = (
+ 8D07F2C80486CC7A007CD1D0 /* GHC.framework */,
+ );
+ name = Products;
+ sourceTree = "<group>";
+ };
+ 0867D691FE84028FC02AAC07 /* GHC */ = {
+ isa = PBXGroup;
+ children = (
+ 08FB77ACFE841707C02AAC07 /* Source */,
+ 089C1665FE841158C02AAC07 /* Resources */,
+ 0867D69AFE84028FC02AAC07 /* External Frameworks and Libraries */,
+ 034768DDFF38A45A11DB9C8B /* Products */,
+ );
+ name = GHC;
+ sourceTree = "<group>";
+ };
+ 0867D69AFE84028FC02AAC07 /* External Frameworks and Libraries */ = {
+ isa = PBXGroup;
+ children = (
+ );
+ name = "External Frameworks and Libraries";
+ sourceTree = "<group>";
+ };
+ 089C1665FE841158C02AAC07 /* Resources */ = {
+ isa = PBXGroup;
+ children = (
+ 8D07F2C70486CC7A007CD1D0 /* Info.plist */,
+ 089C1666FE841158C02AAC07 /* InfoPlist.strings */,
+ );
+ name = Resources;
+ sourceTree = "<group>";
+ };
+ 08FB77ACFE841707C02AAC07 /* Source */ = {
+ isa = PBXGroup;
+ children = (
+ );
+ name = Source;
+ sourceTree = "<group>";
+ };
+/* End PBXGroup section */
+
+/* Begin PBXNativeTarget section */
+ 8D07F2BC0486CC7A007CD1D0 /* GHC */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 4FADC24208B4156D00ABE55E /* Build configuration list for PBXNativeTarget "GHC" */;
+ buildPhases = (
+ 8D07F2BF0486CC7A007CD1D0 /* Resources */,
+ E76B00450D52DFDB00A05A2F /* ShellScript */,
+ );
+ buildRules = (
+ );
+ comments = "This project creates a Mac OS X framework that encapsulates a (relocatable) binary GHC distribution.";
+ dependencies = (
+ );
+ name = GHC;
+ productInstallPath = "$(HOME)/Library/Frameworks";
+ productName = GHC;
+ productReference = 8D07F2C80486CC7A007CD1D0 /* GHC.framework */;
+ productType = "com.apple.product-type.framework";
+ };
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+ 0867D690FE84028FC02AAC07 /* Project object */ = {
+ isa = PBXProject;
+ buildConfigurationList = 4FADC24608B4156D00ABE55E /* Build configuration list for PBXProject "GHC" */;
+ compatibilityVersion = "Xcode 3.0";
+ hasScannedForEncodings = 1;
+ mainGroup = 0867D691FE84028FC02AAC07 /* GHC */;
+ productRefGroup = 034768DDFF38A45A11DB9C8B /* Products */;
+ projectDirPath = "";
+ projectRoot = "";
+ targets = (
+ 8D07F2BC0486CC7A007CD1D0 /* GHC */,
+ );
+ };
+/* End PBXProject section */
+
+/* Begin PBXResourcesBuildPhase section */
+ 8D07F2BF0486CC7A007CD1D0 /* Resources */ = {
+ isa = PBXResourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 8D07F2C00486CC7A007CD1D0 /* InfoPlist.strings in Resources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXResourcesBuildPhase section */
+
+/* Begin PBXShellScriptBuildPhase section */
+ E76B00450D52DFDB00A05A2F /* ShellScript */ = {
+ isa = PBXShellScriptBuildPhase;
+ buildActionMask = 2147483647;
+ comments = "Generate the binary distribution tree.";
+ files = (
+ );
+ inputPaths = (
+ );
+ outputPaths = (
+ "$(TARGET_BUILD_DIR)/$(CONTENTS_FOLDER_PATH)/ghc",
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ shellPath = /bin/sh;
+ shellScript = "if [ ${ACTION} = build ]; then\n make -C ../.. BIN_DIST_TOPDIR_ABS=${TARGET_BUILD_DIR}/${CONTENTS_FOLDER_PATH} BIN_DIST_NAME=ghc binary-dist\nfi\n";
+ };
+/* End PBXShellScriptBuildPhase section */
+
+/* Begin PBXVariantGroup section */
+ 089C1666FE841158C02AAC07 /* InfoPlist.strings */ = {
+ isa = PBXVariantGroup;
+ children = (
+ 089C1667FE841158C02AAC07 /* English */,
+ );
+ name = InfoPlist.strings;
+ sourceTree = "<group>";
+ };
+/* End PBXVariantGroup section */
+
+/* Begin XCBuildConfiguration section */
+ 4FADC24308B4156D00ABE55E /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ COPY_PHASE_STRIP = NO;
+ DYLIB_COMPATIBILITY_VERSION = 1;
+ DYLIB_CURRENT_VERSION = 1;
+ FRAMEWORK_VERSION = A;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_ENABLE_FIX_AND_CONTINUE = YES;
+ GCC_MODEL_TUNING = G5;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = GHC_Prefix.pch;
+ INFOPLIST_FILE = Info.plist;
+ INSTALL_PATH = "$(HOME)/Library/Frameworks";
+ LIBRARY_STYLE = DYNAMIC;
+ MACH_O_TYPE = mh_dylib;
+ PRODUCT_NAME = GHC;
+ WRAPPER_EXTENSION = framework;
+ ZERO_LINK = YES;
+ };
+ name = Debug;
+ };
+ 4FADC24408B4156D00ABE55E /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ARCHS = (
+ ppc,
+ i386,
+ );
+ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+ DYLIB_COMPATIBILITY_VERSION = 1;
+ DYLIB_CURRENT_VERSION = 1;
+ FRAMEWORK_VERSION = A;
+ GCC_MODEL_TUNING = G5;
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = GHC_Prefix.pch;
+ INFOPLIST_FILE = Info.plist;
+ INSTALL_PATH = "$(HOME)/Library/Frameworks";
+ LIBRARY_STYLE = DYNAMIC;
+ MACH_O_TYPE = mh_dylib;
+ PRODUCT_NAME = GHC;
+ VERSIONING_SYSTEM = "";
+ WRAPPER_EXTENSION = framework;
+ };
+ name = Release;
+ };
+ 4FADC24708B4156D00ABE55E /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ GCC_WARN_ABOUT_RETURN_TYPE = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ PREBINDING = NO;
+ SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.5.sdk";
+ };
+ name = Debug;
+ };
+ 4FADC24808B4156D00ABE55E /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ GCC_WARN_ABOUT_RETURN_TYPE = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ PREBINDING = NO;
+ SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.5.sdk";
+ SHORT_VERSION_STRING = "";
+ };
+ name = Release;
+ };
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+ 4FADC24208B4156D00ABE55E /* Build configuration list for PBXNativeTarget "GHC" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 4FADC24308B4156D00ABE55E /* Debug */,
+ 4FADC24408B4156D00ABE55E /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ 4FADC24608B4156D00ABE55E /* Build configuration list for PBXProject "GHC" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 4FADC24708B4156D00ABE55E /* Debug */,
+ 4FADC24808B4156D00ABE55E /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+/* End XCConfigurationList section */
+ };
+ rootObject = 0867D690FE84028FC02AAC07 /* Project object */;
+}