-# Installing
-
-# We want to install the stage 2 bootstrapped compiler by default, but we let
-# the user override this by saying 'make install stage=1', for example.
-ifeq "$(stage)" ""
-INSTALL_STAGE = stage=2
-else
-INSTALL_STAGE =
-endif
-
-# Same as default rule, but we pass $(INSTALL_STAGE) to $(MAKE) too
-install :: check-packages
- @case '${MFLAGS}' in *-[ik]*) x_on_err=0;; *-r*[ik]*) x_on_err=0;; *) x_on_err=1;; esac; \
- for i in $(SUBDIRS); do \
- echo "------------------------------------------------------------------------"; \
- echo "== $(MAKE) $@ $(MFLAGS);"; \
- echo " in $(shell pwd)/$$i"; \
- echo "------------------------------------------------------------------------"; \
- $(MAKE) --no-print-directory -C $$i $(INSTALL_STAGE) $(MFLAGS) $@; \
- if [ $$? -eq 0 -o $$x_on_err -eq 0 ] ; then true; else exit 1; fi; \
- done
-
-ifeq "$(TARGETPLATFORM)" "i386-unknown-mingw32"
-# These files need to be in the InstallShield
-# INSTALL_DATAS rather than INSTALL_DOCS is used so these files go
-# in the top-level directory of the distribution
-INSTALL_DATAS += ANNOUNCE LICENSE README
-endif
-
-# If installing on Windows with MinGW32, copy the gcc compiler, headers and libs
-# and the perl interpreter and dll into the GHC prefix directory.
-# Gcc and Perl source locations derived from configuration data.
-ifeq "$(TARGETPLATFORM)" "i386-unknown-mingw32"
-ifneq "$(WhatGccIsCalled)" ""
-install ::
- -mkdir $(prefix)/gcc-lib
- -mkdir $(prefix)/include
- -mkdir $(prefix)/include/mingw
- -cp -rp $(GccDir)../include/* $(prefix)/include/mingw
- -cp -rp $(GccDir)../lib/gcc-lib/mingw32/$(GccVersion)/* $(prefix)/gcc-lib
- -cp -rp $(GccDir)../lib/gcc/mingw32/$(GccVersion)/* $(prefix)/gcc-lib
- -cp -rp $(GccDir)../libexec/gcc/mingw32/$(GccVersion)/* $(prefix)/gcc-lib
- -cp $(GccDir)../lib/*.* $(prefix)/gcc-lib
- -cp $(GccDir)gcc.exe $(prefix)
- -cp $(GccDir)as.exe $(prefix)/gcc-lib
- -cp $(GccDir)ld.exe $(prefix)/gcc-lib
- -cp $(GccDir)dllwrap.exe $(prefix)/gcc-lib
- -cp $(GccDir)dlltool.exe $(prefix)/gcc-lib
- -cp $(GhcDir)../perl.exe $(prefix)
- -cp $(GhcDir)../perl56.dll $(prefix)
-endif
-endif
-
-install-docs ::
- @case '${MFLAGS}' in *-[ik]*) x_on_err=0;; *-r*[ik]*) x_on_err=0;; *) x_on_err=1;; esac; \
- for i in $(SUBDIRS); do \
- echo "------------------------------------------------------------------------"; \
- echo "== $(MAKE) $@ $(MFLAGS);"; \
- echo " in $(shell pwd)/$$i"; \
- echo "------------------------------------------------------------------------"; \
- $(MAKE) --no-print-directory -C $$i $(INSTALL_STAGE) $(MFLAGS) $@; \
- if [ $$? -eq 0 -o $$x_on_err -eq 0 ] ; then true; else exit 1; fi; \
- done
-
-# -----------------------------------------------------------------------------
-# Making a binary distribution
-#
-# `dist' `binary-dist'
-# 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
-# distribution for. This name can include the version number.
-#
-# For example, the distribution tar file of GCC version 1.40 unpacks
-# into a subdirectory named `gcc-1.40'.
-#
-# The easiest way to do this is to create a subdirectory
-# appropriately named, use ln or cp to install the proper files in
-# it, and then tar that subdirectory.
-#
-# The dist target should explicitly depend on all non-source files
-# 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
-#
-
-ifneq "$(TARGETPLATFORM)" "i386-unknown-mingw32"
-BinDistShScripts = ghc-$(ProjectVersion) ghci-$(ProjectVersion) ghc-pkg-$(ProjectVersion) hsc2hs-ghc
-else
-BinDistShScripts =
-endif
-
-BinDistPrlScripts = ghcprof
-BinDistLibPrlScripts = ghc-asm ghc-split
-BinDistBins = hp2ps runghc
-BinDistLinks = ghc ghci ghc-pkg
-BinDistLibSplicedFiles = package.conf
-BinDistDirs = includes compiler docs driver rts utils
-
-BIN_DIST_TARBALL=ghc-$(ProjectVersion)-$(TARGETPLATFORM).tar.bz2
-
-BIN_DIST_TOP= distrib/Makefile \
- distrib/configure-bin.ac \
- distrib/INSTALL \
- distrib/README \
- ANNOUNCE \
- LICENSE \
- utils/mkdirhier/mkdirhier \
- install-sh \
- config.guess \
- config.sub \
- aclocal.m4
-
-ifeq "$(darwin_TARGET_OS)" "1"
-BIN_DIST_TOP+=mk/fix_install_names.sh
-endif