mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-12-20 07:14:26 +01:00
Rework the mtree portion of etc/Makefile's distrib-dirs target to run
mtree in a shell loop so there is only one mtree commandline. Move the implementation of LOCAL_MTREE into etc/Makefile. Sponsored by: DARPA, AFRL Reviewed by: mtree :)
This commit is contained in:
parent
c109162f52
commit
75534bda19
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=245565
@ -717,7 +717,7 @@ distributeworld installworld: installcheck
|
||||
.endfor
|
||||
-mkdir ${DESTDIR}/${DISTDIR}/base
|
||||
${_+_}cd ${.CURDIR}; ${IMAKE} distrib-dirs \
|
||||
DESTDIR=${DESTDIR}/${DISTDIR}/base
|
||||
LOCAL_MTREE=${LOCAL_MTREE} DESTDIR=${DESTDIR}/${DISTDIR}/base
|
||||
.endif
|
||||
${_+_}cd ${.CURDIR}; ${IMAKE} re${.TARGET:S/world$//}; \
|
||||
${IMAKEENV} rm -rf ${INSTALLTMP}
|
||||
@ -1248,11 +1248,7 @@ cross-tools:
|
||||
# hierarchy - ensure that all the needed directories are present
|
||||
#
|
||||
hierarchy hier:
|
||||
cd ${.CURDIR}/etc; ${MAKE} distrib-dirs
|
||||
.for _mtree in ${LOCAL_MTREE}
|
||||
mtree -eU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/${_mtree} \
|
||||
-p ${DESTDIR}/
|
||||
.endfor
|
||||
cd ${.CURDIR}/etc; ${MAKE} LOCAL_MTREE=${LOCAL_MTREE} distrib-dirs
|
||||
|
||||
#
|
||||
# libraries - build all libraries, and install them under ${DESTDIR}.
|
||||
|
35
etc/Makefile
35
etc/Makefile
@ -293,26 +293,37 @@ distribution:
|
||||
|
||||
MTREE_CMD?= mtree
|
||||
|
||||
distrib-dirs:
|
||||
${MTREE_CMD} -eU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.root.dist -p ${DESTDIR}/
|
||||
${MTREE_CMD} -eU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.var.dist -p ${DESTDIR}/var
|
||||
${MTREE_CMD} -eU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.usr.dist -p ${DESTDIR}/usr
|
||||
${MTREE_CMD} -eU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.include.dist \
|
||||
-p ${DESTDIR}/usr/include
|
||||
MTREES= mtree/BSD.root.dist / \
|
||||
mtree/BSD.var.dist /var \
|
||||
mtree/BSD.usr.dist /usr \
|
||||
mtree/BSD.include.dist /usr/include
|
||||
.if ${MK_BIND_LIBS} != "no"
|
||||
${MTREE_CMD} -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BIND.include.dist \
|
||||
-p ${DESTDIR}/usr/include
|
||||
MTREES+= mtree/BIND.include.dist /usr/include
|
||||
.endif
|
||||
.if ${MK_BIND_MTREE} != "no"
|
||||
${MTREE_CMD} -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BIND.chroot.dist \
|
||||
-p ${DESTDIR}/var/named
|
||||
MTREES+= mtree/BIND.chroot.dist /var/named
|
||||
.endif
|
||||
.if ${MK_GROFF} != "no"
|
||||
${MTREE_CMD} -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.groff.dist -p ${DESTDIR}/usr
|
||||
MTREES+= mtree/BSD.groff.dist /usr
|
||||
.endif
|
||||
.if ${MK_SENDMAIL} != "no"
|
||||
${MTREE_CMD} -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/mtree/BSD.sendmail.dist -p ${DESTDIR}/
|
||||
MTREES+= mtree/BSD.sendmail.dist /
|
||||
.endif
|
||||
.for mtree in ${LOCAL_MTREE}
|
||||
MTREES+= ../${mtree} /
|
||||
.endfor
|
||||
|
||||
distrib-dirs:
|
||||
@set ${MTREES}; \
|
||||
while test $$# -ge 2; do \
|
||||
m=${.CURDIR}/$$1; \
|
||||
shift; \
|
||||
d=${DESTDIR}$$1; \
|
||||
shift; \
|
||||
${ECHO} ${MTREE_CMD} -deU ${MTREE_FOLLOWS_SYMLINKS} \
|
||||
-f $$m -p $$d; \
|
||||
${MTREE_CMD} -deU ${MTREE_FOLLOWS_SYMLINKS} -f $$m -p $$d; \
|
||||
done; true
|
||||
cd ${DESTDIR}/; rm -f ${DESTDIR}/sys; ln -s usr/src/sys sys
|
||||
cd ${DESTDIR}/usr/share/man/en.ISO8859-1; ln -sf ../man* .
|
||||
cd ${DESTDIR}/usr/share/man/en.UTF-8; ln -sf ../man* .
|
||||
|
Loading…
Reference in New Issue
Block a user