summaryrefslogtreecommitdiff
path: root/Makefile.inc1
diff options
context:
space:
mode:
authorEd Maste <emaste@FreeBSD.org>2018-10-23 13:00:11 +0000
committerEd Maste <emaste@FreeBSD.org>2018-10-23 13:00:11 +0000
commit5acedb55c0c249dd7c02bbfda09f10a9267f76fd (patch)
tree7cdc90ec3de5431b84dfa2e990aeee1f402d5197 /Makefile.inc1
parentdaa70021acf714afe133dc688330ad2a85a1eccf (diff)
downloadsrc-test2-5acedb55c0c249dd7c02bbfda09f10a9267f76fd.tar.gz
src-test2-5acedb55c0c249dd7c02bbfda09f10a9267f76fd.zip
sort {delete,check}-old* output
It is more convenient to review old libraries, files, and directories in order. Sort check-* after checking for existence of files for efficiency, and because /usr/lib/debug entries are added while iterating over the list. Reviewed by: brooks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D17649
Notes
Notes: svn path=/head/; revision=339645
Diffstat (limited to 'Makefile.inc1')
-rw-r--r--Makefile.inc114
1 files changed, 7 insertions, 7 deletions
diff --git a/Makefile.inc1 b/Makefile.inc1
index 3ab706661035..46893529162b 100644
--- a/Makefile.inc1
+++ b/Makefile.inc1
@@ -2779,7 +2779,7 @@ delete-old-files: .PHONY
@exec 3<&0; \
cd ${.CURDIR}; \
${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 | \
while read file; do \
if [ -f "${DESTDIR}/$${file}" -o -L "${DESTDIR}/$${file}" ]; then \
chflags noschg "${DESTDIR}/$${file}" 2>/dev/null || true; \
@@ -2795,7 +2795,7 @@ delete-old-files: .PHONY
done
# Remove catpages without corresponding manpages.
@exec 3<&0; \
- find ${DESTDIR}/usr/share/man/cat* ! -type d 2>/dev/null | \
+ find ${DESTDIR}/usr/share/man/cat* ! -type d 2>/dev/null | sort | \
sed -ep -e's:${DESTDIR}/usr/share/man/cat:${DESTDIR}/usr/share/man/man:' | \
while read catpage; do \
read manpage; \
@@ -2819,7 +2819,7 @@ check-old-files: .PHONY
echo "${DESTDIR}${DEBUGDIR}/$${file}.$${ext}"; \
fi; \
done; \
- done
+ done | sort
# Check for catpages without corresponding manpages.
@find ${DESTDIR}/usr/share/man/cat* ! -type d 2>/dev/null | \
sed -ep -e's:${DESTDIR}/usr/share/man/cat:${DESTDIR}/usr/share/man/man:' | \
@@ -2828,7 +2828,7 @@ check-old-files: .PHONY
if [ ! -e "$${manpage}" ]; then \
echo $${catpage}; \
fi; \
- done
+ done | sort
delete-old-libs: .PHONY
@echo ">>> Removing old libraries"
@@ -2836,7 +2836,7 @@ delete-old-libs: .PHONY
@exec 3<&0; \
cd ${.CURDIR}; \
${MAKE} -f ${.CURDIR}/Makefile.inc1 ${.MAKEFLAGS} ${.TARGET} \
- -V OLD_LIBS | xargs -n1 | \
+ -V OLD_LIBS | xargs -n1 | sort | \
while read file; do \
if [ -f "${DESTDIR}/$${file}" -o -L "${DESTDIR}/$${file}" ]; then \
chflags noschg "${DESTDIR}/$${file}" 2>/dev/null || true; \
@@ -2866,7 +2866,7 @@ check-old-libs: .PHONY
echo "${DESTDIR}${DEBUGDIR}/$${file}.$${ext}"; \
fi; \
done; \
- done
+ done | sort
delete-old-dirs: .PHONY
@echo ">>> Removing old directories"
@@ -2891,7 +2891,7 @@ check-old-dirs: .PHONY
@echo ">>> Checking for old directories"
@cd ${.CURDIR}; \
${MAKE} -f ${.CURDIR}/Makefile.inc1 ${.MAKEFLAGS} ${.TARGET} \
- -V OLD_DIRS | xargs -n1 | \
+ -V OLD_DIRS | xargs -n1 | sort -r | \
while read dir; do \
if [ -d "${DESTDIR}/$${dir}" ]; then \
echo "${DESTDIR}/$${dir}"; \