Page MenuHomeFreeBSD

D33327.id99676.diff
No OneTemporary

D33327.id99676.diff

Index: Makefile
===================================================================
--- Makefile
+++ Makefile
@@ -33,6 +33,9 @@
# delete-old-dirs - Delete obsolete directories.
# delete-old-files - Delete obsolete files.
# delete-old-libs - Delete obsolete libraries.
+# list-old-dirs - Raw list of possibly obsolete directories.
+# list-old-files - Raw list of possibly obsolete files.
+# list-old-libs - Raw list of possibly obsolete libraries.
# targets - Print a list of supported TARGET/TARGET_ARCH pairs
# for world and kernel targets.
# toolchains - Build a toolchain for all world and kernel targets.
@@ -154,6 +157,7 @@
installkernel.debug packagekernel packageworld \
reinstallkernel reinstallkernel.debug \
installworld kernel-toolchain libraries maninstall \
+ list-old-dirs list-old-files list-old-libs \
obj objlink showconfig tags toolchain \
makeman sysent \
_worldtmp _legacy _bootstrap-tools _cleanobj _obj \
Index: Makefile.inc1
===================================================================
--- Makefile.inc1
+++ Makefile.inc1
@@ -3202,7 +3202,8 @@
.if make(check-old) || make(check-old-dirs) || \
make(check-old-files) || make(check-old-libs) || \
make(delete-old) || make(delete-old-dirs) || \
- make(delete-old-files) || make(delete-old-libs)
+ make(delete-old-files) || make(delete-old-libs) || \
+ make(list-old-dirs) || make(list-old-files) || make(list-old-libs)
#
# check for / delete old files section
@@ -3221,6 +3222,11 @@
RM_I=-v
.endif
+list-old-files: .PHONY
+ @cd ${.CURDIR}; \
+ ${MAKE} -f ${.CURDIR}/Makefile.inc1 ${.MAKEFLAGS} ${.TARGET} \
+ -V OLD_FILES -V "OLD_FILES:Musr/share/*.gz:R" | xargs -n1 | sort
+
delete-old-files: .PHONY
@echo ">>> Removing old files (only deletes safe to delete libs)"
# Ask for every old file if the user really wants to remove it.
@@ -3230,8 +3236,7 @@
# the Makefile parser segfault.
@exec 3<&0; \
cd ${.CURDIR}; \
- ${MAKE} -f ${.CURDIR}/Makefile.inc1 ${.MAKEFLAGS} ${.TARGET} \
- -V OLD_FILES -V "OLD_FILES:Musr/share/*.gz:R" | xargs -n1 | sort | \
+ ${MAKE} -f ${.CURDIR}/Makefile.inc1 ${.MAKEFLAGS} list-old-files | \
while read file; do \
if [ -f "${DESTDIR}/$${file}" -o -L "${DESTDIR}/$${file}" ]; then \
chflags noschg "${DESTDIR}/$${file}" 2>/dev/null || true; \
@@ -3260,8 +3265,7 @@
check-old-files: .PHONY
@echo ">>> Checking for old files"
@cd ${.CURDIR}; \
- ${MAKE} -f ${.CURDIR}/Makefile.inc1 ${.MAKEFLAGS} ${.TARGET} \
- -V OLD_FILES -V "OLD_FILES:Musr/share/*.gz:R" | xargs -n1 | \
+ ${MAKE} -f ${.CURDIR}/Makefile.inc1 ${.MAKEFLAGS} list-old-files | \
while read file; do \
if [ -f "${DESTDIR}/$${file}" -o -L "${DESTDIR}/$${file}" ]; then \
echo "${DESTDIR}/$${file}"; \
@@ -3271,7 +3275,7 @@
echo "${DESTDIR}${DEBUGDIR}/$${file}.$${ext}"; \
fi; \
done; \
- done | sort
+ done
# 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:' | \
@@ -3282,13 +3286,17 @@
fi; \
done | sort
+list-old-libs: .PHONY
+ @cd ${.CURDIR}; \
+ ${MAKE} -f ${.CURDIR}/Makefile.inc1 ${.MAKEFLAGS} ${.TARGET} \
+ -V OLD_LIBS | xargs -n1 | sort
+
delete-old-libs: .PHONY
@echo ">>> Removing old libraries"
@echo "${OLD_LIBS_MESSAGE}" | fmt
@exec 3<&0; \
cd ${.CURDIR}; \
- ${MAKE} -f ${.CURDIR}/Makefile.inc1 ${.MAKEFLAGS} ${.TARGET} \
- -V OLD_LIBS | xargs -n1 | sort | \
+ ${MAKE} -f ${.CURDIR}/Makefile.inc1 ${.MAKEFLAGS} list-old-libs | \
while read file; do \
if [ -f "${DESTDIR}/$${file}" -o -L "${DESTDIR}/$${file}" ]; then \
chflags noschg "${DESTDIR}/$${file}" 2>/dev/null || true; \
@@ -3307,8 +3315,7 @@
check-old-libs: .PHONY
@echo ">>> Checking for old libraries"
@cd ${.CURDIR}; \
- ${MAKE} -f ${.CURDIR}/Makefile.inc1 ${.MAKEFLAGS} ${.TARGET} \
- -V OLD_LIBS | xargs -n1 | \
+ ${MAKE} -f ${.CURDIR}/Makefile.inc1 ${.MAKEFLAGS} list-old-libs | \
while read file; do \
if [ -f "${DESTDIR}/$${file}" -o -L "${DESTDIR}/$${file}" ]; then \
echo "${DESTDIR}/$${file}"; \
@@ -3318,13 +3325,17 @@
echo "${DESTDIR}${DEBUGDIR}/$${file}.$${ext}"; \
fi; \
done; \
- done | sort
+ done
+
+list-old-dirs: .PHONY
+ @cd ${.CURDIR}; \
+ ${MAKE} -f ${.CURDIR}/Makefile.inc1 ${.MAKEFLAGS} ${.TARGET} \
+ -V OLD_DIRS | xargs -n1 | sort -r
delete-old-dirs: .PHONY
@echo ">>> Removing old directories"
@cd ${.CURDIR}; \
- ${MAKE} -f ${.CURDIR}/Makefile.inc1 ${.MAKEFLAGS} ${.TARGET} \
- -V OLD_DIRS | xargs -n1 | sort -r | \
+ ${MAKE} -f ${.CURDIR}/Makefile.inc1 ${.MAKEFLAGS} list-old-dirs | \
while read dir; do \
if [ -d "${DESTDIR}/$${dir}" ]; then \
rmdir -v "${DESTDIR}/$${dir}" || true; \
@@ -3342,8 +3353,7 @@
check-old-dirs: .PHONY
@echo ">>> Checking for old directories"
@cd ${.CURDIR}; \
- ${MAKE} -f ${.CURDIR}/Makefile.inc1 ${.MAKEFLAGS} ${.TARGET} \
- -V OLD_DIRS | xargs -n1 | sort -r | \
+ ${MAKE} -f ${.CURDIR}/Makefile.inc1 ${.MAKEFLAGS} list-old-dirs | \
while read dir; do \
if [ -d "${DESTDIR}/$${dir}" ]; then \
echo "${DESTDIR}/$${dir}"; \

File Metadata

Mime Type
text/plain
Expires
Sat, Jan 11, 12:42 AM (11 h, 7 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15748402
Default Alt Text
D33327.id99676.diff (5 KB)

Event Timeline