summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorManuel M T Chakravarty <chak@cse.unsw.edu.au>2008-02-09 11:07:27 +0000
committerManuel M T Chakravarty <chak@cse.unsw.edu.au>2008-02-09 11:07:27 +0000
commitb78367803c357d76b4538ea92414b3735de94740 (patch)
treefb1198c25bbd7311769e6d7fd2c9135a89ff622e
parent160cec311bcb566640023124a97ca1d5a1b61a0d (diff)
downloadhaskell-b78367803c357d76b4538ea92414b3735de94740.tar.gz
Mac installer: added support for full docs
-rw-r--r--distrib/MacOS/GHC-system.pmdoc/01ghc.xml2
-rw-r--r--distrib/MacOS/GHC-system.pmdoc/index.xml8
-rw-r--r--distrib/MacOS/GHC.xcodeproj/project.pbxproj6
-rw-r--r--distrib/MacOS/Makefile2
-rw-r--r--distrib/MacOS/installer-scripts/Uninstaller18
-rw-r--r--distrib/MacOS/installer-scripts/create-links20
6 files changed, 41 insertions, 15 deletions
diff --git a/distrib/MacOS/GHC-system.pmdoc/01ghc.xml b/distrib/MacOS/GHC-system.pmdoc/01ghc.xml
index f313f78db4..f507669631 100644
--- a/distrib/MacOS/GHC-system.pmdoc/01ghc.xml
+++ b/distrib/MacOS/GHC-system.pmdoc/01ghc.xml
@@ -1 +1 @@
-<pkgref spec="1.12" uuid="FD3688D8-0443-4DCE-A3BB-F4A8EF12A4AB"><config><identifier>org.haskell.glasgowHaskellCompiler.ghc.pkg</identifier><version>1</version><description></description><post-install type="none"/><requireAuthorization/><installFrom mod="true" includeRoot="true">/tmp/GHC.dst/Library/Frameworks/GHC.framework</installFrom><installTo>/Library/Frameworks</installTo><flags><followSymbolicLinks/><allowRevert/><mod>allowRevert</mod></flags><packageStore type="internal"></packageStore><mod>scripts.scriptsDirectoryPath.isRelativeType</mod><mod>scripts.postinstall.isRelativeType</mod><mod>installTo.isRelativeType</mod><mod>scripts.postinstall.isAbsoluteType</mod><mod>installFrom.isAbsoluteType</mod><mod>includeRoot</mod><mod>parent</mod><mod>scripts.postinstall.path</mod><mod>requireAuthorization</mod><mod>relocatable</mod><mod>installFrom.isRelativeType</mod><mod>installFrom.path</mod><mod>installTo</mod></config><scripts><postinstall relative="true" mod="true">installer-scripts/create-links</postinstall><scripts-dir relative="true" mod="true">installer-scripts</scripts-dir></scripts><contents><file-list>01ghc-contents.xml</file-list><component id="org.haskell.GHC" path="/tmp/GHC.dst/Library/Frameworks/GHC.framework" version="609.20080205"/><filter>/CVS$</filter><filter>/\.svn$</filter><filter>/\.cvsignore$</filter><filter>/\.cvspass$</filter><filter>/\.DS_Store$</filter></contents></pkgref> \ No newline at end of file
+<pkgref spec="1.12" uuid="FD3688D8-0443-4DCE-A3BB-F4A8EF12A4AB"><config><identifier>org.haskell.glasgowHaskellCompiler.ghc.pkg</identifier><version>1</version><description></description><post-install type="none"/><requireAuthorization/><installFrom mod="true" includeRoot="true">/tmp/GHC.dst/Library/Frameworks/GHC.framework</installFrom><installTo>/Library/Frameworks</installTo><flags><followSymbolicLinks/><allowRevert/><mod>allowRevert</mod></flags><packageStore type="internal"></packageStore><mod>scripts.scriptsDirectoryPath.isRelativeType</mod><mod>scripts.postinstall.isRelativeType</mod><mod>installTo.isRelativeType</mod><mod>scripts.postinstall.isAbsoluteType</mod><mod>installFrom.isAbsoluteType</mod><mod>includeRoot</mod><mod>parent</mod><mod>scripts.postinstall.path</mod><mod>requireAuthorization</mod><mod>relocatable</mod><mod>installFrom.isRelativeType</mod><mod>installFrom.path</mod><mod>installTo</mod></config><scripts><postinstall relative="true" mod="true">installer-scripts/create-links</postinstall><scripts-dir relative="true" mod="true">installer-scripts</scripts-dir></scripts><contents><component id="org.haskell.GHC" path="/tmp/GHC.dst/Library/Frameworks/GHC.framework" version="609.20080205"/><filter>/CVS$</filter><filter>/\.svn$</filter><filter>/\.cvsignore$</filter><filter>/\.cvspass$</filter><filter>/\.DS_Store$</filter></contents></pkgref> \ No newline at end of file
diff --git a/distrib/MacOS/GHC-system.pmdoc/index.xml b/distrib/MacOS/GHC-system.pmdoc/index.xml
index 65e8544ae2..13a39a1edc 100644
--- a/distrib/MacOS/GHC-system.pmdoc/index.xml
+++ b/distrib/MacOS/GHC-system.pmdoc/index.xml
@@ -16,9 +16,13 @@ Xcode can be installed off your Mac OS X installation DVD or be downloaded from
{\colortbl;\red255\green255\blue255;}
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural\pardirnatural
-\f0\fs26 \cf0 To start the Glasgow Haskell Compiler interactively, invoke the command 'ghci' in a Terminal window. \
+\f0\fs26 \cf0 To start the Glasgow Haskell Compiler interactively, invoke the command 'ghci' in a Terminal window.\
\
-Extensive documentation is available online at\
+A user's guide and detailed library documentation is at\
+\
+ /usr/share/doc/ghc/index.html\
+\
+More documentation is available online at\
\
http://haskell.org/haskellwiki/GHC\
\
diff --git a/distrib/MacOS/GHC.xcodeproj/project.pbxproj b/distrib/MacOS/GHC.xcodeproj/project.pbxproj
index 442ce82736..733fa9cdc5 100644
--- a/distrib/MacOS/GHC.xcodeproj/project.pbxproj
+++ b/distrib/MacOS/GHC.xcodeproj/project.pbxproj
@@ -94,7 +94,7 @@
);
buildRules = (
);
- comments = "Supported targets: build, install, clean\n\nPrecondition: We are in a distribution tree, not a vanilla tree from darcs - i.e., \"sh boot\" was already executed.\n\nThis project creates a Mac OS X framework at /Library/Frameworks.\n\n* The framework is versioned using GHC's ProjectVersionInt.\n\n* The target configures the tree for the deployment location and builds the tree.\n\n* This target installs the framework not into its final destination, but into a build directory using the DESTDIR feature of GHC build system (unless the deployment flag in the build rules is set).\n\n* The idea is that the framework at the build location is being turned into a package and the package installer eventually puts its at its final destination. \n\nTODO: build and install documentation";
+ comments = "Supported targets: build, install\n\nPrecondition: We are in a distribution tree, not a vanilla tree from darcs - i.e., \"sh boot\" was already executed.\n\nThis project creates a Mac OS X framework at /Library/Frameworks.\n\n* The framework is versioned using GHC's ProjectVersionInt.\n\n* The target configures the tree for the deployment location and builds the tree.\n\n* This target installs the framework not into its final destination, but into a build directory using the DESTDIR feature of GHC build system (unless the deployment flag in the build rules is set).\n\n* The idea is that the framework at the build location is being turned into a package and the package installer eventually puts its at its final destination. \n\nTODO: build and install documentation";
dependencies = (
);
name = "GHC-systemwide";
@@ -145,7 +145,7 @@
E72A15EA0D54ADB90059C234 /* ShellScript */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
- comments = "Perform a DESTDIR install unless the build settings have DEPLOYMENT_LOCATION=1.\n\nNB: Why use a run script build phase instead of an external target (with a dependency)? Because we need to be underneath the GHC target to get the right build settings.";
+ comments = "Build and install both code and documentation. Building includes configuring the tree with the right prefix.\n\nNB: Why use a run script build phase instead of an external target (with a dependency)? Because we need to be underneath the GHC target to get the right build settings.";
files = (
);
inputPaths = (
@@ -154,7 +154,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
- shellScript = "# We need to be at the top of the ghc tree\ncd ../..\n\nPREFIX=${INSTALL_PATH}/${CONTENTS_FOLDER_PATH}/usr\n\nif [ ${ACTION} = installsrc ]; then\n echo \"xcodebuild action 'installsrc' not supported\"\n exit 0\nfi\n\nif [ ${ACTION} = build ]; then\n ./configure --prefix=${PREFIX}\n MAKE_ACTION=\nelse\n MAKE_ACTION=${ACTION}\nfi\n\nmake DESTDIR=${DSTROOT} ${MAKE_ACTION}\n";
+ shellScript = "# We need to be at the top of the ghc tree\ncd ../..\n\nPREFIX=${INSTALL_PATH}/${CONTENTS_FOLDER_PATH}/usr\n\nif [ ${ACTION} = build ]; then\n ./configure --prefix=${PREFIX}\n MAKE_ACTION=\n DOCS_ACTION=html\nelse\n MAKE_ACTION=${ACTION}\n DOCS_ACTION=install-docs\nfi\n\n# Yes, it's the vanilla install target that must see HADDOCK_DOCS=YES, not the install-docs target\nmake DESTDIR=${DSTROOT} HADDOCK_DOCS=YES ${MAKE_ACTION}\nmake DESTDIR=${DSTROOT} XMLDocWays=html ${DOCS_ACTION}";
};
E76B00450D52DFDB00A05A2F /* ShellScript */ = {
isa = PBXShellScriptBuildPhase;
diff --git a/distrib/MacOS/Makefile b/distrib/MacOS/Makefile
index 7f4698a719..6b44d15e59 100644
--- a/distrib/MacOS/Makefile
+++ b/distrib/MacOS/Makefile
@@ -57,7 +57,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)\
diff --git a/distrib/MacOS/installer-scripts/Uninstaller b/distrib/MacOS/installer-scripts/Uninstaller
index de4141be53..0b79258f25 100644
--- a/distrib/MacOS/installer-scripts/Uninstaller
+++ b/distrib/MacOS/installer-scripts/Uninstaller
@@ -5,11 +5,13 @@
INSTALL_DEST=/Library/Frameworks
INSTALL_BASE=/
+
if [ ${INSTALL_BASE} = / ]; then
- INSTALL_BIN=/usr/bin
-else
- INSTALL_BIN=${INSTALL_BASE}/bin
+ INSTALL_BASE=/usr
fi
+INSTALL_BIN=${INSTALL_BASE}/bin
+INSTALL_MAN1=${INSTALL_BASE}/share/man/man1
+INSTALL_HTML=${INSTALL_BASE}/share/doc
if [ ! -x ${INSTALL_DEST}/GHC.framework ]; then
echo "${INSTALL_DEST}/GHC.framework does not exit"
@@ -51,6 +53,16 @@ for thisfile in `ls ${INSTALL_BIN}`; do
rm -f ${INSTALL_BIN}/${thisfile}
fi
done
+for thisfile in `ls ${INSTALL_MAN1}`; do
+ if ls -l ${INSTALL_MAN1}/${thisfile} | grep -q GHC.framework/Versions; then
+ rm -f ${INSTALL_MAN1}/${thisfile}
+ fi
+done
+for thisfile in `ls ${INSTALL_HTML}`; do
+ if ls -l ${INSTALL_HTML}/${thisfile} | grep -q GHC.framework/Versions; then
+ rm -f ${INSTALL_HTML}/${thisfile}
+ fi
+done
echo "Removing ${INSTALL_DEST}/GHC.framework"
rm -rf ${INSTALL_DEST}/GHC.framework
diff --git a/distrib/MacOS/installer-scripts/create-links b/distrib/MacOS/installer-scripts/create-links
index bbe9fa683f..7102f1261e 100644
--- a/distrib/MacOS/installer-scripts/create-links
+++ b/distrib/MacOS/installer-scripts/create-links
@@ -1,15 +1,25 @@
#!/bin/sh
# GHC framework post-install script
-# * Add links to all executables into standard bin/ directory
+# * Add links to all executables into the standard bin/ directory
+# * Add link to the man page into the standard man/man1/ directory
+# * Add link to the HTML docs into the standard share/doc/ directory
INSTALL_DEST=$2
INSTALL_BASE=$3
if [ ${INSTALL_BASE} = / ]; then
- INSTALL_BIN=/usr/bin/
-else
- INSTALL_BIN=${INSTALL_BASE}/bin/
+ INSTALL_BASE=/usr
fi
+
+INSTALL_BIN=${INSTALL_BASE}/bin
mkdir -p ${INSTALL_BIN}
-ln -sf ${INSTALL_DEST}/GHC.framework/Versions/Current/usr/bin/* ${INSTALL_BIN}
+ln -sf ${INSTALL_DEST}/GHC.framework/Versions/Current/usr/bin/* ${INSTALL_BIN}/
+
+INSTALL_MAN1=${INSTALL_BASE}/share/man/man1
+INSTALL_HTML=${INSTALL_BASE}/share/doc
+mkdir -p ${INSTALL_MAN1}
+ln -sf ${INSTALL_DEST}/GHC.framework/Versions/Current/usr/share/man/man1/*\
+ ${INSTALL_MAN1}/
+ln -sf ${INSTALL_DEST}/GHC.framework/Versions/Current/usr/share/doc/ghc\
+ ${INSTALL_HTML}/