diff options
author | Herbert Valerio Riedel <hvr@gnu.org> | 2014-02-26 22:20:52 +0100 |
---|---|---|
committer | Herbert Valerio Riedel <hvr@gnu.org> | 2014-02-26 22:26:25 +0100 |
commit | 32f41c79960ffc1d04c4573acb37756109d279a5 (patch) | |
tree | 77a78d7e0eafe3057f49a1ace4f39fb7800fb1eb /ghc.mk | |
parent | 98b6756b09194352aa2ccfbb624992150a7a3520 (diff) | |
download | haskell-32f41c79960ffc1d04c4573acb37756109d279a5.tar.gz |
Make distribution tarball compression format configurable
By default, bzip2 compression is selected (which is what has been used
till now). Additionally, by setting the TAR_COMP make variable to one of
the values "bzip2", "gzip", or "xz", an explicit compression format can
be requested for the distribution tarballs. For instance, invoking
make TAR_COMP=xz sdist-ghc
will result in a tarball `./sdistprep/ghc-7.9.20140226-src.tar.xz`
Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
Diffstat (limited to 'ghc.mk')
-rw-r--r-- | ghc.mk | 18 |
1 files changed, 9 insertions, 9 deletions
@@ -1009,12 +1009,12 @@ unix-binary-dist-prep: $(call removeFiles,$(BIN_DIST_PREP_TAR)) # 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 - cd bindistprep && "$(TAR_CMD)" hcf - -T ../bindist-list | bzip2 -c > ../$(BIN_DIST_PREP_TAR_BZ2) + cd bindistprep && "$(TAR_CMD)" hcf - -T ../bindist-list | $(TAR_COMP_CMD) -c > ../$(BIN_DIST_PREP_TAR_COMP) windows-binary-dist-prep: $(call removeTrees,bindistprep/) $(MAKE) prefix=$(TOP)/$(BIN_DIST_PREP_DIR) install - cd bindistprep && "$(TAR_CMD)" cf - $(BIN_DIST_NAME) | bzip2 -c > ../$(BIN_DIST_PREP_TAR_BZ2) + cd bindistprep && "$(TAR_CMD)" cf - $(BIN_DIST_NAME) | $(TAR_COMP_CMD) -c > ../$(BIN_DIST_PREP_TAR_COMP) # tryTimes tries to run its third argument multiple times, until it # succeeds. Don't call it directly; call try10Times instead. @@ -1032,7 +1032,7 @@ try10Times = $(call tryTimes,,x x x x x x x x x x,$1) { echo Failed; false; } .PHONY: publish-binary-dist publish-binary-dist: - $(call try10Times,$(PublishCp) $(BIN_DIST_TAR_BZ2) $(PublishLocation)/dist) + $(call try10Times,$(PublishCp) $(BIN_DIST_TAR_COMP) $(PublishLocation)/dist) ifeq "$(mingw32_TARGET_OS)" "1" DOCDIR_TO_PUBLISH = $(BIN_DIST_INST_DIR)/doc @@ -1072,17 +1072,17 @@ SRC_DIST_BASE_NAME = ghc-$(ProjectVersion) SRC_DIST_GHC_NAME = ghc-$(ProjectVersion)-src SRC_DIST_GHC_ROOT = $(SRC_DIST_ROOT)/ghc SRC_DIST_GHC_DIR = $(SRC_DIST_GHC_ROOT)/$(SRC_DIST_BASE_NAME) -SRC_DIST_GHC_TARBALL = $(SRC_DIST_ROOT)/$(SRC_DIST_GHC_NAME).tar.bz2 +SRC_DIST_GHC_TARBALL = $(SRC_DIST_ROOT)/$(SRC_DIST_GHC_NAME).tar.$(TAR_COMP_EXT) SRC_DIST_WINDOWS_TARBALLS_NAME = ghc-$(ProjectVersion)-windows-extra-src SRC_DIST_WINDOWS_TARBALLS_ROOT = $(SRC_DIST_ROOT)/windows-tarballs SRC_DIST_WINDOWS_TARBALLS_DIR = $(SRC_DIST_WINDOWS_TARBALLS_ROOT)/$(SRC_DIST_BASE_NAME) -SRC_DIST_WINDOWS_TARBALLS_TARBALL = $(SRC_DIST_ROOT)/$(SRC_DIST_WINDOWS_TARBALLS_NAME).tar.bz2 +SRC_DIST_WINDOWS_TARBALLS_TARBALL = $(SRC_DIST_ROOT)/$(SRC_DIST_WINDOWS_TARBALLS_NAME).tar.$(TAR_COMP_EXT) SRC_DIST_TESTSUITE_NAME = ghc-$(ProjectVersion)-testsuite SRC_DIST_TESTSUITE_ROOT = $(SRC_DIST_ROOT)/testsuite-ghc SRC_DIST_TESTSUITE_DIR = $(SRC_DIST_TESTSUITE_ROOT)/$(SRC_DIST_BASE_NAME) -SRC_DIST_TESTSUITE_TARBALL = $(SRC_DIST_ROOT)/$(SRC_DIST_TESTSUITE_NAME).tar.bz2 +SRC_DIST_TESTSUITE_TARBALL = $(SRC_DIST_ROOT)/$(SRC_DIST_TESTSUITE_NAME).tar.$(TAR_COMP_EXT) # # Files to include in source distributions @@ -1160,15 +1160,15 @@ sdist-testsuite-prep : .PHONY: sdist-ghc sdist-ghc: sdist-ghc-prep - cd $(SRC_DIST_GHC_ROOT) && "$(TAR_CMD)" chf - $(SRC_DIST_BASE_NAME) 2> src_ghc_log | bzip2 > $(TOP)/$(SRC_DIST_GHC_TARBALL) + cd $(SRC_DIST_GHC_ROOT) && "$(TAR_CMD)" chf - $(SRC_DIST_BASE_NAME) 2> src_ghc_log | $(TAR_COMP_CMD) -c > $(TOP)/$(SRC_DIST_GHC_TARBALL) .PHONY: sdist-windows-tarballs sdist-windows-tarballs: sdist-windows-tarballs-prep - cd $(SRC_DIST_WINDOWS_TARBALLS_ROOT) && "$(TAR_CMD)" chf - $(SRC_DIST_BASE_NAME) 2> windows_extra_src_ghc_log | bzip2 > $(TOP)/$(SRC_DIST_WINDOWS_TARBALLS_TARBALL) + cd $(SRC_DIST_WINDOWS_TARBALLS_ROOT) && "$(TAR_CMD)" chf - $(SRC_DIST_BASE_NAME) 2> windows_extra_src_ghc_log | $(TAR_COMP_CMD) -c > $(TOP)/$(SRC_DIST_WINDOWS_TARBALLS_TARBALL) .PHONY: sdist-testsuite sdist-testsuite: sdist-testsuite-prep - cd $(SRC_DIST_TESTSUITE_ROOT) && "$(TAR_CMD)" chf - $(SRC_DIST_BASE_NAME) 2> testsuite_log | bzip2 > $(TOP)/$(SRC_DIST_TESTSUITE_TARBALL) + cd $(SRC_DIST_TESTSUITE_ROOT) && "$(TAR_CMD)" chf - $(SRC_DIST_BASE_NAME) 2> testsuite_log | $(TAR_COMP_CMD) -c > $(TOP)/$(SRC_DIST_TESTSUITE_TARBALL) .PHONY: sdist |