Commit 845e0b2b authored by Ian Lynagh's avatar Ian Lynagh

Change where bindists are made

We now do all the hard work in a bindistprep subdirectory, and just move
the result to the root directory. This way we can delete anything in
bindistprep/ without worrying about deleting anything important.
parent fd274ffd
...@@ -45,7 +45,7 @@ endif ...@@ -45,7 +45,7 @@ endif
include mk/custom-settings.mk include mk/custom-settings.mk
# No need to update makefiles for these targets: # No need to update makefiles for these targets:
REALGOALS=$(filter-out binary-dist bootstrapping-files framework-pkg clean clean_% distclean maintainer-clean show help,$(MAKECMDGOALS)) REALGOALS=$(filter-out binary-dist binary-dist-prep bootstrapping-files framework-pkg clean clean_% distclean maintainer-clean show help,$(MAKECMDGOALS))
# configure touches certain files even if they haven't changed. This # configure touches certain files even if they haven't changed. This
# can mean a lot of unnecessary recompilation after a re-configure, so # can mean a lot of unnecessary recompilation after a re-configure, so
...@@ -77,14 +77,20 @@ endif ...@@ -77,14 +77,20 @@ endif
@echo "===--- finished updating makefiles" @echo "===--- finished updating makefiles"
$(MAKE) -r --no-print-directory -f ghc.mk $@ $(MAKE) -r --no-print-directory -f ghc.mk $@
binary-dist: binary-dist: binary-dist-prep
ifeq "$(mingw32_TARGET_OS)" "1" ifeq "$(mingw32_TARGET_OS)" "1"
$(MAKE) -r --no-print-directory -f ghc.mk windows-binary-dist mv bindistprep/*.exe .
endif
mv bindistprep/*.tar.bz2 .
binary-dist-prep:
ifeq "$(mingw32_TARGET_OS)" "1"
$(MAKE) -r --no-print-directory -f ghc.mk windows-binary-dist-prep
$(MAKE) -r --no-print-directory -f ghc.mk windows-installer $(MAKE) -r --no-print-directory -f ghc.mk windows-installer
else else
rm -f bindist-list rm -f bindist-list
$(MAKE) -r --no-print-directory -f ghc.mk bindist BINDIST=YES $(MAKE) -r --no-print-directory -f ghc.mk bindist BINDIST=YES
$(MAKE) -r --no-print-directory -f ghc.mk binary-dist $(MAKE) -r --no-print-directory -f ghc.mk unix-binary-dist-prep
endif endif
clean distclean maintainer-clean: clean distclean maintainer-clean:
......
...@@ -865,26 +865,26 @@ endif ...@@ -865,26 +865,26 @@ endif
# mk/project.mk gets an absolute path, so we manually include it in # mk/project.mk gets an absolute path, so we manually include it in
# the bindist with a relative path # the bindist with a relative path
BIN_DIST_MK = $(BIN_DIST_NAME)/bindist.mk BIN_DIST_MK = $(BIN_DIST_DIR)/bindist.mk
binary-dist: unix-binary-dist-prep:
"$(RM)" $(RM_OPTS) -r $(BIN_DIST_NAME) "$(RM)" $(RM_OPTS) -r bindistprep/*
mkdir $(BIN_DIST_NAME) mkdir $(BIN_DIST_DIR)
set -e; for i in LICENSE compiler ghc rts libraries utils docs libffi includes driver mk rules Makefile aclocal.m4 config.sub config.guess install-sh extra-gcc-opts.in ghc.mk inplace; do ln -s ../$$i $(BIN_DIST_NAME)/; done set -e; for i in LICENSE compiler ghc rts libraries utils docs libffi includes driver mk rules Makefile aclocal.m4 config.sub config.guess install-sh extra-gcc-opts.in ghc.mk inplace; do ln -s ../../$$i $(BIN_DIST_DIR)/; done
echo "HADDOCK_DOCS = $(HADDOCK_DOCS)" >> $(BIN_DIST_MK) echo "HADDOCK_DOCS = $(HADDOCK_DOCS)" >> $(BIN_DIST_MK)
echo "LATEX_DOCS = $(LATEX_DOCS)" >> $(BIN_DIST_MK) echo "LATEX_DOCS = $(LATEX_DOCS)" >> $(BIN_DIST_MK)
echo "BUILD_DOCBOOK_HTML = $(BUILD_DOCBOOK_HTML)" >> $(BIN_DIST_MK) echo "BUILD_DOCBOOK_HTML = $(BUILD_DOCBOOK_HTML)" >> $(BIN_DIST_MK)
echo "BUILD_DOCBOOK_PS = $(BUILD_DOCBOOK_PS)" >> $(BIN_DIST_MK) echo "BUILD_DOCBOOK_PS = $(BUILD_DOCBOOK_PS)" >> $(BIN_DIST_MK)
echo "BUILD_DOCBOOK_PDF = $(BUILD_DOCBOOK_PDF)" >> $(BIN_DIST_MK) echo "BUILD_DOCBOOK_PDF = $(BUILD_DOCBOOK_PDF)" >> $(BIN_DIST_MK)
ln -s ../distrib/configure-bin.ac $(BIN_DIST_NAME)/configure.ac ln -s ../../distrib/configure-bin.ac $(BIN_DIST_DIR)/configure.ac
cd $(BIN_DIST_NAME) && autoreconf cd $(BIN_DIST_DIR) && autoreconf
"$(RM)" $(RM_OPTS) $(BIN_DIST_TAR) "$(RM)" $(RM_OPTS) $(BIN_DIST_TAR)
# h means "follow symlinks", e.g. if aclocal.m4 is a symlink to a source # 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 # tree then we want to include the real file, not a symlink to it
"$(TAR)" hcf - -T $(BIN_DIST_LIST) | bzip2 -c > $(BIN_DIST_TAR_BZ2) cd bindistprep && "$(TAR)" hcf - -T $(BIN_DIST_LIST) | bzip2 -c > $(BIN_DIST_TAR_BZ2)
windows-binary-dist: windows-binary-dist-prep:
"$(RM)" $(RM_OPTS) -r $(BIN_DIST_NAME) "$(RM)" $(RM_OPTS) -r bindistprep/*
$(MAKE) prefix=$(BIN_DIST_DIR) install $(MAKE) prefix=$(BIN_DIST_DIR) install
"$(TAR)" cf - $(BIN_DIST_NAME) | bzip2 -c > $(BIN_DIST_TAR_BZ2) "$(TAR)" cf - $(BIN_DIST_NAME) | bzip2 -c > $(BIN_DIST_TAR_BZ2)
......
...@@ -362,13 +362,11 @@ DEFAULT_TMPDIR = /C/TEMP ...@@ -362,13 +362,11 @@ DEFAULT_TMPDIR = /C/TEMP
endif endif
BIN_DIST_TOPDIR_ABS=$(TOP) BIN_DIST_TOPDIR_ABS=$(TOP)
BIN_DIST_DIR=$(BIN_DIST_TOPDIR_ABS)/$(BIN_DIST_NAME) BIN_DIST_DIR=$(BIN_DIST_TOPDIR_ABS)/bindistprep/$(BIN_DIST_NAME)
BIN_DIST_NAME=ghc-$(ProjectVersion) BIN_DIST_NAME=ghc-$(ProjectVersion)
BIN_DIST_TAR=$(TOP)/$(BIN_DIST_NAME)-$(TARGETPLATFORM).tar BIN_DIST_TAR=$(TOP)/bindistprep/$(BIN_DIST_NAME)-$(TARGETPLATFORM).tar
BIN_DIST_TAR_BZ2=$(BIN_DIST_TAR).bz2 BIN_DIST_TAR_BZ2=$(BIN_DIST_TAR).bz2
BIN_DIST_PREP_DIR=$(TOP)/bindist-prep
BIN_DIST_PREP=$(BIN_DIST_PREP_DIR)/$(BIN_DIST_NAME)
BIN_DIST_LIST=$(TOP)/bindist-list BIN_DIST_LIST=$(TOP)/bindist-list
WINDOWS_INSTALLER_BASE = ghc-$(ProjectVersion)-i386-windows WINDOWS_INSTALLER_BASE = ghc-$(ProjectVersion)-i386-windows
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment