Move some LIBCOMPAT tmpdir logic setup to its own build target.

Its own build target was already handling mtree extractions
just as _worldtmp did, so the other cleaning of the
tmpdir makes sense here as well.

Sponsored by:	Dell EMC Isilon
This commit is contained in:
Bryan Drewery 2017-10-29 01:21:02 +00:00
parent a3d90ddfb2
commit 67d2f51ad6
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=325074
2 changed files with 10 additions and 8 deletions

View file

@ -817,19 +817,11 @@ _worldtmp: .PHONY
@echo "--------------------------------------------------------------"
.if !defined(NO_CLEAN)
rm -rf ${WORLDTMP}
.if defined(LIBCOMPAT)
rm -rf ${LIBCOMPATTMP}
.endif
.else
.if exists(${WORLDTMP})
@echo ">>> Deleting stale files in build tree..."
${_+_}cd ${.CURDIR}; ${WMAKE} -DBATCH_DELETE_OLD_FILES \
delete-old delete-old-libs >/dev/null
.endif
.if defined(LIBCOMPAT) && exists(${LIBCOMPATTMP})
${_+_}cd ${.CURDIR}; ${WMAKE} -DBATCH_DELETE_OLD_FILES \
DESTDIR=${LIBCOMPATTMP} \
delete-old delete-old-libs >/dev/null
.endif
rm -rf ${WORLDTMP}/legacy/usr/include
.if ${USING_SYSTEM_COMPILER} == "yes"

View file

@ -148,6 +148,16 @@ build${libcompat}: .PHONY
@echo "--------------------------------------------------------------"
@echo ">>> stage 5.1: building lib${libcompat} shim libraries"
@echo "--------------------------------------------------------------"
.if !defined(NO_CLEAN)
rm -rf ${LIBCOMPATTMP}
.else
.if exists(${LIBCOMPATTMP})
${_+_}cd ${.CURDIR}; ${WMAKE} -DBATCH_DELETE_OLD_FILES \
DESTDIR=${LIBCOMPATTMP} \
delete-old delete-old-libs >/dev/null
.endif
.endif # !defined(NO_CLEAN)
mkdir -p ${LIBCOMPATTMP}/usr/include
mtree -deU -f ${.CURDIR}/etc/mtree/BSD.usr.dist \
-p ${LIBCOMPATTMP}/usr >/dev/null