-
-.PHONY: binary-dist-pre% binary-dist
-
-binary-dist:: binary-dist-pre
-
-binary-dist-pre::
- $(MKDIRHIER) $(BIN_DIST_DIR)/mk
- echo 'include $$(TOP)/Makefile-vars' > $(BIN_DIST_DIR)/mk/boilerplate.mk
- echo 'include $$(TOP)/mk/package.mk' > $(BIN_DIST_DIR)/mk/target.mk
- echo 'include $$(TOP)/mk/install.mk' >> $(BIN_DIST_DIR)/mk/target.mk
- echo 'include $$(TOP)/mk/recurse.mk' >> $(BIN_DIST_DIR)/mk/target.mk
- echo '' > $(BIN_DIST_DIR)/mk/compat.mk
- cp mk/package.mk $(BIN_DIST_DIR)/mk/
- cp mk/install.mk $(BIN_DIST_DIR)/mk/
- cp mk/recurse.mk $(BIN_DIST_DIR)/mk/
- cp mk/fptools.css $(BIN_DIST_DIR)/mk/
- $(MKDIRHIER) $(BIN_DIST_DIR)/lib/$(TARGETPLATFORM)
- $(MKDIRHIER) $(BIN_DIST_DIR)/share
-
-binary-dist::
- $(MAKE) -C gmp binary-dist DOING_BIN_DIST=YES
- $(MAKE) -C includes binary-dist DOING_BIN_DIST=YES
- $(MAKE) -C compiler binary-dist DOING_BIN_DIST=YES $(INSTALL_STAGE)
- $(MAKE) -C rts binary-dist DOING_BIN_DIST=YES
- $(MAKE) -C driver binary-dist DOING_BIN_DIST=YES
- $(MAKE) -C utils binary-dist DOING_BIN_DIST=YES
- $(MAKE) -C docs binary-dist DOING_BIN_DIST=YES
- $(MAKE) -C libraries binary-dist DOING_BIN_DIST=YES
- $(MAKE) -C libraries/Cabal/doc binary-dist DOING_BIN_DIST=YES
-
-VARFILE=$(BIN_DIST_DIR)/Makefile-vars.in
-
-binary-dist::
- @for i in $(BIN_DIST_TOP); do \
- if test -f "$$i"; then \
- echo cp $$i $(BIN_DIST_DIR); \
- cp $$i $(BIN_DIST_DIR); \
- fi; \
- done;
- @echo "Configuring the Makefile for this project..."
- echo > $(VARFILE)
- echo "package = ghc" >> $(VARFILE)
- echo "version = $(ProjectVersion)" >> $(VARFILE)
- echo "ProjectVersion = $(ProjectVersion)" >> $(VARFILE)
- echo "HaveLibGmp = $(HaveLibGmp)" >> $(VARFILE)
- echo "GhcLibsWithUnix = $(GhcLibsWithUnix)" >> $(VARFILE)
- echo "GhcWithInterpreter = $(GhcWithInterpreter)" >> $(VARFILE)
- echo "GhcHasReadline = $(GhcHasReadline)" >> $(VARFILE)
- echo "BootingFromHc = $(BootingFromHc)" >> $(VARFILE)
- echo "XMLDocWays = $(XMLDocWays)" >> $(VARFILE)
- # We won't actually use xsltproc, but we need to know if it's "" or not
- echo "XSLTPROC = $(XSLTPROC)" >> $(VARFILE)
- echo "TARGETPLATFORM = $(TARGETPLATFORM)" >> $(VARFILE)
- echo "HADDOCK_DOCS = $(HADDOCK_DOCS)" >> $(VARFILE)
-
- cat distrib/Makefile-bin-vars.in >> $(VARFILE)
- @echo "Generating a shippable configure script.."
- $(MV) $(BIN_DIST_DIR)/configure-bin.ac $(BIN_DIST_DIR)/configure.ac
- ( cd $(BIN_DIST_DIR); autoreconf )