Added Uninstaller
[ghc-hetmet.git] / distrib / MacOS / Makefile
1 ############################################################################
2 #
3 #               This is the GHC Makefile for MacOS X-specific targets
4 #
5 # Targets: 
6 #
7 #       framework-pkg  [MacOS only]
8 #               Builds /Library/Frameworks/GHC.framework wrapped into a Mac
9 #               installer package; must be executed in a ./configure'd tree
10 #               (--prefix doesn't matter as it will be overridden)
11 #
12 #       framework-binary-dist  [MacOS only]
13 #               Builds GHC.framework encapsulating a binary distribution
14 #               (to give a relocatable framework); must be used in a fully
15 #               built tree
16 #
17 ############################################################################
18
19 TOP=../..
20 include $(TOP)/mk/boilerplate.mk
21
22 # The ProjectVersionInt is GHC's idea of an API version and hence determines
23 # the framework version.
24 FRAMEWORK_VERSION = $(ProjectVersionInt)
25
26 # Xcode requires CURRENT_PROJECT_VERSION to be an int or float.  We use this
27 # only as the build version (aka CFBundleVersion).
28 CURRENT_PROJECT_VERSION = $(ProjectVersionInt).$(ProjectPatchLevel)
29
30 # The user-visible CFBundleShortVersionString is set to the standard GHC 
31 # version number.
32 SHORT_VERSION_STRING = $(ProjectVersion)
33
34 framework-pkg:
35         xcodebuild -target GHC-systemwide install\
36                    CURRENT_PROJECT_VERSION=$(CURRENT_PROJECT_VERSION)\
37                    SHORT_VERSION_STRING=$(SHORT_VERSION_STRING)\
38                    FRAMEWORK_VERSION=$(FRAMEWORK_VERSION)\
39                    CURRENT_LIBRARY_VERSION=$(FRAMEWORK_VERSION)
40         @echo "FIXME: What about the contents list?!?"; exit 1
41         @echo "FIXME: call the packager"; exit 1
42
43 # Instead of making 'binary-dist' a Makefile dependency, we let xcodebuild call
44 # 'make binary-dist'.  This has the advantage that xcode knows the framework
45 # path into which the distribution should be installed and can instruct 
46 # binary-dist to put it directly into the right place without copying the whole
47 # tree yet another time.
48 #
49 framework-binary-dist:
50         xcodebuild -target GHC-relocatable build\
51                    CURRENT_PROJECT_VERSION=$(CURRENT_PROJECT_VERSION)\
52                    SHORT_VERSION_STRING=$(SHORT_VERSION_STRING)\
53                    FRAMEWORK_VERSION=$(FRAMEWORK_VERSION)\
54                    CURRENT_LIBRARY_VERSION=$(FRAMEWORK_VERSION)
55         @echo "FIXME: call the packager"; exit 1