mtree -deU -f ${.CURDIR}/etc/mtree/BSD.debug.dist \
-p ${WORLDTMP}/usr/lib >/dev/null
.endif
+.if ${MK_LIB32} != "no"
+ mtree -deU -f ${.CURDIR}/etc/mtree/BSD.lib32.dist \
+ -p ${WORLDTMP}/usr >/dev/null
+.if ${MK_DEBUG_FILES} != "no"
+ mtree -deU -f ${.CURDIR}/etc/mtree/BSD.lib32.dist \
+ -p ${WORLDTMP}/legacy/usr/lib/debug/usr >/dev/null
+ mtree -deU -f ${.CURDIR}/etc/mtree/BSD.lib32.dist \
+ -p ${WORLDTMP}/usr/lib/debug/usr >/dev/null
+.endif
+.endif
.if ${MK_TESTS} != "no"
mkdir -p ${WORLDTMP}${TESTSBASE}
mtree -deU -f ${.CURDIR}/etc/mtree/BSD.tests.dist \
-p ${LIB32TMP}/usr >/dev/null
mtree -deU -f ${.CURDIR}/etc/mtree/BSD.include.dist \
-p ${LIB32TMP}/usr/include >/dev/null
+ mtree -deU -f ${.CURDIR}/etc/mtree/BSD.lib32.dist \
+ -p ${LIB32TMP}/usr >/dev/null
.if ${MK_DEBUG_FILES} != "no"
mtree -deU -f ${.CURDIR}/etc/mtree/BSD.debug.dist \
-p ${LIB32TMP}/usr/lib >/dev/null
+ mtree -deU -f ${.CURDIR}/etc/mtree/BSD.lib32.dist \
+ -p ${LIB32TMP}/usr/lib/debug/usr >/dev/null
.endif
mkdir -p ${WORLDTMP}
ln -sf ${.CURDIR}/sys ${WORLDTMP}
mtree -deU -f ${.CURDIR}/etc/mtree/BSD.debug.dist \
-p ${DESTDIR}/${DISTDIR}/${dist}/usr/lib >/dev/null
.endif
+.if ${MK_LIB32} != "no"
+ mtree -deU -f ${.CURDIR}/etc/mtree/BSD.lib32.dist \
+ -p ${DESTDIR}/${DISTDIR}/${dist}/usr >/dev/null
+.if ${MK_DEBUG_FILES} != "no"
+ mtree -deU -f ${.CURDIR}/etc/mtree/BSD.lib32.dist \
+ -p ${DESTDIR}/${DISTDIR}/${dist}/usr/lib/debug/usr >/dev/null
+.endif
+.endif
.if ${MK_TESTS} != "no" && ${dist} == "tests"
-mkdir -p ${DESTDIR}/${DISTDIR}/${dist}${TESTSBASE}
mtree -deU -f ${.CURDIR}/etc/mtree/BSD.tests.dist \
sed -e 's#^\./#./${dist}/usr/#' >> ${METALOG}
${IMAKEENV} mtree -C -f ${.CURDIR}/etc/mtree/BSD.include.dist | \
sed -e 's#^\./#./${dist}/usr/include/#' >> ${METALOG}
+.if ${MK_LIB32} != "no"
+ ${IMAKEENV} mtree -C -f ${.CURDIR}/etc/mtree/BSD.lib32.dist | \
+ sed -e 's#^\./#./${dist}/usr/#' >> ${METALOG}
+.endif
.endif
.endfor
-mkdir ${DESTDIR}/${DISTDIR}/base
-p ${XDDESTDIR}/usr >/dev/null
mtree -deU -f ${.CURDIR}/etc/mtree/BSD.include.dist \
-p ${XDDESTDIR}/usr/include >/dev/null
+.if ${MK_LIB32} != "no"
+ mtree -deU -f ${.CURDIR}/etc/mtree/BSD.lib32.dist \
+ -p ${XDDESTDIR}/usr >/dev/null
+.endif
.if ${MK_TESTS} != "no"
mkdir -p ${XDDESTDIR}${TESTSBASE}
mtree -deU -f ${.CURDIR}/etc/mtree/BSD.tests.dist \
OLD_FILES+=usr/share/man/man8/moused.8.gz
.endif
-#.if ${MK_LIB32} == no
-# to be filled in
-#.endif
+.if ${MK_LIB32} == no
+OLD_FILES+=etc/mtree/BSD.lib32.dist
+OLD_FILES+=libexec/ld-elf32.so.1
+. if exists(${DESTDIR}/usr/lib32)
+LIB32_DIRS!=find ${DESTDIR}/usr/lib32 -type d \
+ | sed -e 's,^${DESTDIR}/,,'; echo
+LIB32_FILES!=find ${DESTDIR}/usr/lib32 \! -type d \
+ \! -name "lib*.so*" | sed -e 's,^${DESTDIR}/,,'; echo
+LIB32_LIBS!=find ${DESTDIR}/usr/lib32 \! -type d \
+ -name "lib*.so*" | sed -e 's,^${DESTDIR}/,,'; echo
+OLD_DIRS+=${LIB32_DIRS}
+OLD_FILES+=${LIB32_FILES}
+OLD_LIBS+=${LIB32_LIBS}
+. endif
+. if ${MK_DEBUG_FILES} == no
+. if exists(${DESTDIR}/usr/lib/debug/usr/lib32)
+DEBUG_LIB32_DIRS!=find ${DESTDIR}/usr/lib/debug/usr/lib32 -type d \
+ | sed -e 's,^${DESTDIR}/,,'; echo
+DEBUG_LIB32_FILES!=find ${DESTDIR}/usr/lib/debug/usr/lib32 \! -type d \
+ \! -name "lib*.so*" | sed -e 's,^${DESTDIR}/,,'; echo
+DEBUG_LIB32_LIBS!=find ${DESTDIR}/usr/lib/debug/usr/lib32 \! -type d \
+ -name "lib*.so*" | sed -e 's,^${DESTDIR}/,,'; echo
+OLD_DIRS+=${DEBUG_LIB32_DIRS}
+OLD_FILES+=${DEBUG_LIB32_FILES}
+OLD_LIBS+=${DEBUG_LIB32_LIBS}
+. endif
+. endif
+.endif
.if ${MK_LIBCPLUSPLUS} == no
OLD_LIBS+=lib/libcxxrt.so.1