diff options
author | gjb <gjb@FreeBSD.org> | 2015-02-09 10:42:27 +0000 |
---|---|---|
committer | gjb <gjb@FreeBSD.org> | 2015-02-09 10:42:27 +0000 |
commit | da504cb140988f12af5ab679fb85938a0c462de5 (patch) | |
tree | 4cab4091dd4d1ef7731e6ca9b98ca1a222d3869d /release/Makefile | |
parent | ea9a3d8b689a4a59325cd5bf19ef65140375696a (diff) | |
download | FreeBSD-src-da504cb140988f12af5ab679fb85938a0c462de5.zip FreeBSD-src-da504cb140988f12af5ab679fb85938a0c462de5.tar.gz |
Enable multi-threaded xz(1) compression, after r278433.
Allow multi-threaded xz(1) to be turned off by specifying
NO_XZTHREADS, and allow number of threads to be overridden
by specifying XZ_THREADS=N.
MFC after: 1 week
X-MFC-needs: r278433
Sponsored by: The FreeBSD Foundation
Diffstat (limited to 'release/Makefile')
-rw-r--r-- | release/Makefile | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/release/Makefile b/release/Makefile index 0dffc1b..b28546c 100644 --- a/release/Makefile +++ b/release/Makefile @@ -33,6 +33,9 @@ # with xz(1) (extremely time consuming) # WITH_CLOUDWARE: if set, build cloud hosting disk images with the release # TARGET/TARGET_ARCH: architecture of built release +# XZ_FLAGS: Additional arguments to pass to xz(1) +# XZ_THREADS: Number of xz(1) threads to use +# NO_XZTHREADS: Disable multi-threaded xz(1) compression # WORLDDIR?= ${.CURDIR}/.. @@ -40,6 +43,8 @@ PORTSDIR?= /usr/ports DOCDIR?= /usr/doc RELNOTES_LANG?= en_US.ISO8859-1 XZCMD?= /usr/bin/xz +XZ_FLAGS?= +XZ_THREADS?= .if !defined(TARGET) || empty(TARGET) TARGET= ${MACHINE} @@ -58,6 +63,15 @@ DISTDIR= dist FREEBSD_VERSION!= awk '/^\#define __FreeBSD_version/ {print $$3}' \ ${.CURDIR}/../sys/sys/param.h +.if !defined(NO_XZTHREADS) && empty(XZ_THREADS) +XZ_THREADS= 0 +.else +XZ_THREADS= ${XZ_THREADS} +.endif +.if !empty(XZ_THREADS) +XZ_FLAGS+= -T ${XZ_THREADS} +.endif + # Define OSRELEASE by using newvars.sh .if !defined(OSRELEASE) || empty(OSRELEASE) .for _V in TYPE BRANCH REVISION @@ -299,7 +313,7 @@ release-install: .for I in ${IMAGES} cp -p ${I} ${DESTDIR}/${OSRELEASE}-${I} . if defined(WITH_COMPRESSED_IMAGES) && !empty(WITH_COMPRESSED_IMAGES) - ${XZCMD} -k ${DESTDIR}/${OSRELEASE}-${I} + ${XZCMD} ${XZ_FLAGS} -k ${DESTDIR}/${OSRELEASE}-${I} . endif .endfor cd ${DESTDIR} && sha256 ${OSRELEASE}* > ${DESTDIR}/CHECKSUM.SHA256 |