Reverse directories order when doing 'make delete-old-dir'. This
ensures subdirectories gets removed before their parents when doing make delete-old. Approved by: re (gjb) MFC after: 2 weeks
This commit is contained in:
parent
befd6ea0ad
commit
88e9d84421
@ -1673,7 +1673,7 @@ delete-old-files:
|
|||||||
# the Makefile parser segfault.
|
# the Makefile parser segfault.
|
||||||
@exec 3<&0; \
|
@exec 3<&0; \
|
||||||
${MAKE} -f ${.CURDIR}/Makefile.inc1 ${.MAKEFLAGS} ${.TARGET} \
|
${MAKE} -f ${.CURDIR}/Makefile.inc1 ${.MAKEFLAGS} ${.TARGET} \
|
||||||
-V OLD_FILES -V "OLD_FILES:Musr/share/*.gz:R" | xargs -n1 | \
|
-V OLD_FILES -V "OLD_FILES:Musr/share/*.gz:R" | xargs -n1 | sort -r | \
|
||||||
while read file; do \
|
while read file; do \
|
||||||
if [ -f "${DESTDIR}/$${file}" -o -L "${DESTDIR}/$${file}" ]; then \
|
if [ -f "${DESTDIR}/$${file}" -o -L "${DESTDIR}/$${file}" ]; then \
|
||||||
chflags noschg "${DESTDIR}/$${file}" 2>/dev/null || true; \
|
chflags noschg "${DESTDIR}/$${file}" 2>/dev/null || true; \
|
||||||
|
Loading…
Reference in New Issue
Block a user