packages: Allow actually building individual world packages in parallel.

MFC after:	2 weeks
Sponsored by:	Dell EMC Isilon
This commit is contained in:
bdrewery 2017-06-23 18:26:54 +00:00
parent 59c2de28ee
commit dd9392fbd8

View File

@ -1570,24 +1570,34 @@ create-world-packages: _pkgbootstrap .PHONY
awk -f ${SRCDIR}/release/scripts/mtree-to-plist.awk \ awk -f ${SRCDIR}/release/scripts/mtree-to-plist.awk \
${WSTAGEDIR}/METALOG ${WSTAGEDIR}/METALOG
@for plist in ${WSTAGEDIR}/*.plist; do \ @for plist in ${WSTAGEDIR}/*.plist; do \
plist=$${plist##*/} ; \ plist=$${plist##*/} ; \
pkgname=$${plist%.plist} ; \ pkgname=$${plist%.plist} ; \
sh ${SRCDIR}/release/packages/generate-ucl.sh -o $${pkgname} \ echo "_PKGS+= $${pkgname}" ; \
-s ${SRCDIR} -u ${WSTAGEDIR}/$${pkgname}.ucl ; \ done > ${WSTAGEDIR}/packages.mk
done ${_+_}@cd ${.CURDIR}; \
@for plist in ${WSTAGEDIR}/*.plist; do \ ${MAKE} -f Makefile.inc1 create-world-packages-jobs \
plist=$${plist##*/} ; \ .MAKE.JOB.PREFIX=
pkgname=$${plist%.plist} ; \
awk -F\" ' \ .if make(create-world-packages-jobs)
/^name/ { printf("===> Creating %s-", $$2); next } \ .include "${WSTAGEDIR}/packages.mk"
/^version/ { print $$2; next } \ .endif
' ${WSTAGEDIR}/$${pkgname}.ucl ; \
${PKG_CMD} -o ABI_FILE=${WSTAGEDIR}/bin/sh -o ALLOW_BASE_SHLIBS=yes \ create-world-packages-jobs: .PHONY
create -M ${WSTAGEDIR}/$${pkgname}.ucl \ .for pkgname in ${_PKGS}
-p ${WSTAGEDIR}/$${pkgname}.plist \ create-world-packages-jobs: create-world-package-${pkgname}
-r ${WSTAGEDIR} \ create-world-package-${pkgname}: .PHONY
-o ${REPODIR}/$$(${PKG_CMD} -o ABI_FILE=${WSTAGEDIR}/bin/sh config ABI)/${PKG_VERSION} ; \ @sh ${SRCDIR}/release/packages/generate-ucl.sh -o ${pkgname} \
done -s ${SRCDIR} -u ${WSTAGEDIR}/${pkgname}.ucl
@awk -F\" ' \
/^name/ { printf("===> Creating %s-", $$2); next } \
/^version/ { print $$2; next } \
' ${WSTAGEDIR}/${pkgname}.ucl ; \
${PKG_CMD} -o ABI_FILE=${WSTAGEDIR}/bin/sh -o ALLOW_BASE_SHLIBS=yes \
create -M ${WSTAGEDIR}/${pkgname}.ucl \
-p ${WSTAGEDIR}/${pkgname}.plist \
-r ${WSTAGEDIR} \
-o ${REPODIR}/$$(${PKG_CMD} -o ABI_FILE=${WSTAGEDIR}/bin/sh config ABI)/${PKG_VERSION}
.endfor
create-kernel-packages: _pkgbootstrap .PHONY create-kernel-packages: _pkgbootstrap .PHONY
.if exists(${KSTAGEDIR}/kernel.meta) .if exists(${KSTAGEDIR}/kernel.meta)