-
- cp distrib/Makefile $(BIN_DIST_PREP)
- cp distrib/INSTALL $(BIN_DIST_PREP)
- cp distrib/README $(BIN_DIST_PREP)
- cp distrib/configure-bin.ac $(BIN_DIST_PREP)/configure.ac
-# We can't just list aclocal.m4 in $(BIN_DIST_LIST), as it needs to be
-# next to configure.ac when we run autoreconf
- cp aclocal.m4 $(BIN_DIST_PREP)
- cd $(BIN_DIST_PREP) && autoreconf
-# We need to copy the pwd program that was built with stage1 to where
-# the build system expects to find it, i.e. the location the pwd built
-# with the bootstrapping compiler normally occupies
- $(MKDIRHIER) $(BIN_DIST_PREP)/utils/pwd
- cp utils/pwd/dist-install/build/pwd/pwd $(BIN_DIST_PREP)/utils/pwd
-# And likewise the installPackage program
- $(MKDIRHIER) $(BIN_DIST_PREP)/utils/installPackage/install-inplace/bin
- cp utils/installPackage/dist-install/build/installPackage/installPackage \
- $(BIN_DIST_PREP)/utils/installPackage/install-inplace/bin
-
- echo "package = ghc" >> $(BIN_DIST_VARFILE)
- echo "version = $(ProjectVersion)" >> $(BIN_DIST_VARFILE)
- echo "ProjectVersion = $(ProjectVersion)" >> $(BIN_DIST_VARFILE)
- echo "HaveLibGmp = $(HaveLibGmp)" >> $(BIN_DIST_VARFILE)
- echo "GhcLibsWithUnix = $(GhcLibsWithUnix)" >> $(BIN_DIST_VARFILE)
- echo "GhcWithInterpreter = $(GhcWithInterpreter)" >> $(BIN_DIST_VARFILE)
- echo "GhcHasEditline = $(GhcHasEditline)" >> $(BIN_DIST_VARFILE)
- echo "BootingFromHc = $(BootingFromHc)" >> $(BIN_DIST_VARFILE)
- echo "XMLDocWays = $(XMLDocWays)" >> $(BIN_DIST_VARFILE)
-# We won't actually use xsltproc, but we need to know if it's "" or not
- echo "XSLTPROC = $(XSLTPROC)" >> $(BIN_DIST_VARFILE)
- echo "TARGETPLATFORM = $(TARGETPLATFORM)" >> $(BIN_DIST_VARFILE)
- echo "HADDOCK_DOCS = $(HADDOCK_DOCS)" >> $(BIN_DIST_VARFILE)
- echo "INTEGER_LIBRARY = $(INTEGER_LIBRARY)" >> $(BIN_DIST_VARFILE)
- cat distrib/Makefile-bin-vars.in >> $(BIN_DIST_VARFILE)
-
-# With that done, we can now build the actual tarball
-
- $(RM) -f $(BIN_DIST_NAME)
- ln -s . $(BIN_DIST_NAME)
-# h means "follow symlinks", e.g. if aclocal.m4 is a symlink to a source
-# tree then we want to include the real file, not a symlink to it
- tar hcf $(BIN_DIST_TAR) -T $(BIN_DIST_LIST)
- cd $(BIN_DIST_PREP_DIR) && tar rf $(BIN_DIST_TAR) $(BIN_DIST_NAME)
- bzip2 < $(BIN_DIST_TAR) > $(BIN_DIST_TAR_BZ2)
- tar tf $(BIN_DIST_TAR) | sort > bin-manifest-$(ProjectVersion)
-endif
-
-# XXX Presumably we still need to do this for Windows?
-## Tar up the distribution and build a manifest
-#binary-dist :: tar-binary-dist
-#
-#.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 >$(FPTOOLS_TOP_ABS)/bin-manifest-$(ProjectVersion) )
-
-PUBLISH_FILES = $(BIN_DIST_TARBALL)
-
-# Upload the distribution and documentation
-ifneq "$(ISCC)" ""
-WINDOWS_INSTALLER_BASE = ghc-$(ProjectVersion)-$(TARGETPLATFORM)
-WINDOWS_INSTALLER = $(WINDOWS_INSTALLER_BASE)$(exeext)
-
-PUBLISH_FILES += $(WINDOWS_INSTALLER)
-
-binary-dist :: generate-windows-installer
-
-.PHONY: generate-windows-installer
-generate-windows-installer ::
- $(SED) "s/@VERSION@/$(ProjectVersion)/" distrib/ghc.iss | $(ISCC) /O. /F$(WINDOWS_INSTALLER_BASE) -